Class: ProxES::RolePolicy::Scope

Inherits:
ApplicationPolicy::Scope show all
Defined in:
lib/proxes/policies/role_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy::Scope

#scope, #user

Instance Method Summary collapse

Methods inherited from ApplicationPolicy::Scope

#initialize

Constructor Details

This class inherits a constructor from ProxES::ApplicationPolicy::Scope

Instance Method Details

#resolveObject



31
32
33
34
35
36
37
# File 'lib/proxes/policies/role_policy.rb', line 31

def resolve
  if user && user.super_admin?
    scope
  else
    scope.where(id: -1)
  end
end