docbrown/app/policies/admin_policy.rb
Jeremy Friesen c70d3f759c
Renaming policy methods for consistency (#16523)
Our domain of "admin?" method names is already a bit confounding.  The
policy methods renamed the existing Policy::Authorizer methods, and
further obfuscated and confused intention.

This refactor aligns the policy methods with the Policy::Authorizer
methods.  It is a non-breaking change, but one that may add warnings in
the logs.  If you see those, resolve them per instructions.

Related to #16483
2022-02-11 09:10:54 -05:00

9 lines
124 B
Ruby

class AdminPolicy < ApplicationPolicy
def show?
user_super_admin?
end
def minimal?
user_any_admin?
end
end