diff options
author | Jarka Kadlecová <jarka@gitlab.com> | 2018-08-19 22:43:41 +0300 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2018-09-04 13:25:18 +0300 |
commit | d729ea19dac6a5d3ae4073a4050eda7b1215fd75 (patch) | |
tree | 53ca95eaa40b4af1c3cde140cd607d3c853e20a6 /app/policies | |
parent | be1ef711edb13114cf6478821293bb2f0821e75c (diff) |
Restrict reopening locked issues for issue authors
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/issuable_policy.rb | 1 | ||||
-rw-r--r-- | app/policies/issue_policy.rb | 4 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/app/policies/issuable_policy.rb b/app/policies/issuable_policy.rb index 198bb168d85..6d8b575102e 100644 --- a/app/policies/issuable_policy.rb +++ b/app/policies/issuable_policy.rb @@ -14,6 +14,7 @@ class IssuablePolicy < BasePolicy rule { assignee_or_author }.policy do enable :read_issue enable :update_issue + enable :reopen_issue enable :read_merge_request enable :update_merge_request end diff --git a/app/policies/issue_policy.rb b/app/policies/issue_policy.rb index 94b5f37c682..a0706eaa46c 100644 --- a/app/policies/issue_policy.rb +++ b/app/policies/issue_policy.rb @@ -19,4 +19,8 @@ class IssuePolicy < IssuablePolicy prevent :update_issue prevent :admin_issue end + + rule { locked }.policy do + prevent :reopen_issue + end end diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index f52a3bad77d..50d39d826a2 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -176,6 +176,7 @@ class ProjectPolicy < BasePolicy enable :fork_project enable :create_project_snippet enable :update_issue + enable :reopen_issue enable :admin_issue enable :admin_label enable :admin_list |