1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/policies/open_api/client_policy.rb
2016-05-09 18:15:04 +02:00

22 lines
319 B
Ruby

class OpenAPI::ClientPolicy < ApplicationPolicy
def index?
user.has_role? :admin
end
def create?
user.has_role? :admin
end
def update?
user.has_role? :admin
end
def reset_token?
user.has_role? :admin
end
def destroy?
user.has_role? :admin and record.calls_count == 0
end
end