rosa-build/app/policies/user_policy.rb

21 lines
320 B
Ruby

class UserPolicy < ApplicationPolicy
def show?
true
end
def update?
is_admin? || record == user
end
alias_method :notifiers?, :update?
alias_method :show_current_user?, :update?
alias_method :write?, :update?
class Scope < Scope
def show
scope
end
end
end