diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-09 12:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-09 12:09:24 +0000 |
commit | 0ab6d56c15ebf4a12981556c7d3bc53d9b62cdb9 (patch) | |
tree | 31f28e85bb24de18240f3ddeaf5c3367e4510c3a /app/policies | |
parent | 079ad2772f2b78f56b26730307cc73d1376fa6d6 (diff) | |
download | gitlab-ce-0ab6d56c15ebf4a12981556c7d3bc53d9b62cdb9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-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') |