Class: ContributionPolicy::Scope

Inherits:
Scope
  • Object
show all
Defined in:
app/policies/contribution_policy.rb

Instance Method Summary collapse

Instance Method Details

#resolveObject


5
6
7
8
9
10
11
# File 'app/policies/contribution_policy.rb', line 5

def resolve
  if (user and (user.editor? or user.admin?))
    scope.all
  else
    scope.where(:id => nil)
  end
end