Class: Locomotive::SitePolicy::Scope

Inherits:
ApplicationPolicy::Scope show all
Defined in:
app/policies/locomotive/site_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy::Scope

#membership, #scope

Instance Method Summary collapse

Methods inherited from ApplicationPolicy::Scope

#initialize

Constructor Details

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

Instance Method Details

#resolveObject


6
7
8
9
10
11
12
# File 'app/policies/locomotive/site_policy.rb', line 6

def resolve
  if membership..super_admin?
    scope.all
  else
    membership..sites
  end
end