1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/policies/open_api/client_policy.rb

22 lines
319 B
Ruby
Raw Normal View History

2016-05-09 18:15:04 +02:00
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