Files
codeocean/app/policies/tip_policy.rb
2021-05-14 22:03:06 +02:00

14 lines
221 B
Ruby

# frozen_string_literal: true
class TipPolicy < AdminOnlyPolicy
class Scope < Scope
def resolve
if @user.admin? || @user.teacher?
@scope.all
else
@scope.none
end
end
end
end