From 3974bc83f3bfc8a7757dcac0319e966042dc4356 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 17 May 2022 06:08:24 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/policies/work_item_policy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/policies') 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 -- cgit v1.2.1