diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/policies/project_member_policy.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/policies/project_member_policy.rb')
-rw-r--r-- | app/policies/project_member_policy.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/project_member_policy.rb b/app/policies/project_member_policy.rb index ca33b95e523..91f1eb35506 100644 --- a/app/policies/project_member_policy.rb +++ b/app/policies/project_member_policy.rb @@ -8,7 +8,11 @@ class ProjectMemberPolicy < BasePolicy condition(:project_bot) { @subject.user&.project_bot? } rule { anonymous }.prevent_all - rule { target_is_owner }.prevent_all + + rule { target_is_owner }.policy do + prevent :update_project_member + prevent :destroy_project_member + end rule { ~project_bot & can?(:admin_project_member) }.policy do enable :update_project_member |