class Arpa::Services::Verifier
Public Class Methods
new(current_user)
click to toggle source
# File lib/arpa/services/verifier.rb, line 4 def initialize(current_user) @current_user = current_user end
Public Instance Methods
has_access?(resource, action)
click to toggle source
# File lib/arpa/services/verifier.rb, line 8 def has_access?(resource, action) free_access_action = action.to_s.split('_')[0] return true if @current_user.is_arpa_admin? || free_access_action.empty? action_finder.permission(resource.to_s, action.to_s, @current_user.profile_ids) end
Private Instance Methods
action_finder()
click to toggle source
# File lib/arpa/services/verifier.rb, line 16 def action_finder @action_finder ||= Arpa::Repositories::Actions::Finder.new end