Class: Oxen::AccountPolicy::Scope
- Inherits:
-
Scope
- Object
- Scope
- Oxen::AccountPolicy::Scope
- Defined in:
- app/policies/oxen/account_policy.rb
Instance Method Summary collapse
Instance Method Details
#resolve ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/policies/oxen/account_policy.rb', line 5 def resolve if current_user.nil? super elsif current_user.admin? scope.all else scope.where(id: current_user.account.id) end end |