asciinema.org/app/policies/api_token_policy.rb
2015-05-08 10:19:52 +00:00

8 lines
107 B
Ruby

class ApiTokenPolicy < ApplicationPolicy
def destroy?
user.admin? || record.user == user
end
end