fix entiry layouts
This commit is contained in:
14
app/policies/entity_policy.rb
Normal file
14
app/policies/entity_policy.rb
Normal 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
|
Reference in New Issue
Block a user