mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
22 lines
319 B
Ruby
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
|