asciinema.org/app/policies/api_token_policy.rb

8 lines
107 B
Ruby
Raw Normal View History

2015-04-02 09:45:39 +00:00
class ApiTokenPolicy < ApplicationPolicy
def destroy?
user.admin? || record.user == user
end
end