diff options
Diffstat (limited to 'app/policies/user_policy.rb')
-rw-r--r-- | app/policies/user_policy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index 61030b6d5e6..70e8fb32064 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -27,6 +27,7 @@ class UserPolicy < BasePolicy rule { default }.enable :read_user_profile rule { (private_profile | blocked_user) & ~(user_is_self | admin) }.prevent :read_user_profile rule { user_is_self | admin }.enable :disable_two_factor + rule { (user_is_self | admin) & ~blocked }.enable :create_user_personal_access_token end UserPolicy.prepend_if_ee('EE::UserPolicy') |