diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-04-02 21:38:47 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-10 16:46:20 +0300 |
commit | 8272ec9a7683863c43d217c97bdf7bf165cb3cf2 (patch) | |
tree | ae4fba36f47e12514789a309049af230da7135f4 /app/policies/note_policy.rb | |
parent | 267a909600e02f0728fec1765adf817acc03d813 (diff) |
Update policies to make archived projects completely read-only
Diffstat (limited to 'app/policies/note_policy.rb')
-rw-r--r-- | app/policies/note_policy.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/policies/note_policy.rb b/app/policies/note_policy.rb index 2f6c579906c..6659bf062c4 100644 --- a/app/policies/note_policy.rb +++ b/app/policies/note_policy.rb @@ -3,7 +3,6 @@ class NotePolicy < BasePolicy delegate { @subject.noteable if @subject.noteable.lockable? } condition(:is_author) { @user && @subject.author == @user } - condition(:for_merge_request, scope: :subject) { @subject.for_merge_request? } condition(:is_noteable_author) { @user && @subject.noteable.author_id == @user.id } condition(:editable, scope: :subject) { @subject.editable? } @@ -16,7 +15,7 @@ class NotePolicy < BasePolicy enable :resolve_note end - rule { for_merge_request & is_noteable_author }.policy do + rule { is_noteable_author }.policy do enable :resolve_note end end |