We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3e8c3de + bdca01c commit cab69deCopy full SHA for cab69de
app/policies/user_policy.rb
@@ -2,7 +2,7 @@
2
3
class UserPolicy < BasePolicy
4
condition(:user_is_self) { subject.id == user&.id }
5
- condition(:user_is_admin) { user.admin? }
+ condition(:user_is_admin) { user&.admin? || false }
6
7
rule { ~anonymous }.enable :read_user
8
0 commit comments