hubfeenix.fi/app/policies/entity_policy.rb
2023-01-16 19:23:26 +02:00

15 lines
250 B
Ruby

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