fix entiry layouts

This commit is contained in:
2023-01-16 19:23:26 +02:00
parent 37164b534d
commit 3447b44299
6 changed files with 60 additions and 52 deletions

View File

@ -0,0 +1,14 @@
class EntityPolicy < ApplicationPolicy
def owner?
member.admin?
end
alias :owner? :index?
alias :owner? :show?
alias :owner? :create?
alias :owner? :new?
alias :owner? :update?
alias :owner? :edit?
alias :owner? :destroy?
end