summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-17 06:08:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-17 06:08:24 +0000
commit3974bc83f3bfc8a7757dcac0319e966042dc4356 (patch)
tree784130df5c94e3652259c8cd433468c454c733ce /app/policies
parent620e22ef03af2978c215573603a3911bb7f0c3fb (diff)
downloadgitlab-ce-3974bc83f3bfc8a7757dcac0319e966042dc4356.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/work_item_policy.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/policies/work_item_policy.rb b/app/policies/work_item_policy.rb
index b4723bc7ed8..e191e8d26ca 100644
--- a/app/policies/work_item_policy.rb
+++ b/app/policies/work_item_policy.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
class WorkItemPolicy < IssuePolicy
- rule { can?(:owner_access) | is_author }.enable :delete_work_item
+ condition(:is_member_and_author) { is_project_member? & is_author? }
+
+ rule { can?(:destroy_issue) | is_member_and_author }.enable :delete_work_item
rule { can?(:update_issue) }.enable :update_work_item