Class: Ditty::UserPolicy::Scope
- Inherits:
- 
      ApplicationPolicy::Scope
      
        - Object
- ApplicationPolicy::Scope
- Ditty::UserPolicy::Scope
 
- Defined in:
- lib/ditty/policies/user_policy.rb
Instance Attribute Summary
Attributes inherited from ApplicationPolicy::Scope
Instance Method Summary collapse
Methods inherited from ApplicationPolicy::Scope
Constructor Details
This class inherits a constructor from Ditty::ApplicationPolicy::Scope
Instance Method Details
#resolve ⇒ Object
| 38 39 40 41 42 43 44 | # File 'lib/ditty/policies/user_policy.rb', line 38 def resolve if user && user.super_admin? scope else scope.where(id: user.id) end end |