implantação da fase 2 e 3
This commit is contained in:
20
app/policies/configuracao_policy.rb
Normal file
20
app/policies/configuracao_policy.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# app/policies/configuracao_policy.rb
|
||||
class ConfiguracaoPolicy < ApplicationPolicy
|
||||
def index?
|
||||
admin_ou_gerente?
|
||||
end
|
||||
|
||||
def edit?
|
||||
admin?
|
||||
end
|
||||
|
||||
def update?
|
||||
admin?
|
||||
end
|
||||
|
||||
class Scope < Scope
|
||||
def resolve
|
||||
scope.all
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user