Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/work_item_policy.rb')
-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