diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-04-02 19:05:47 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-10 15:46:20 +0200 |
commit | 267a909600e02f0728fec1765adf817acc03d813 (patch) | |
tree | bc3b43e72a5f09793ad9217d0d3ed0eedb0173a2 /app/policies/note_policy.rb | |
parent | d18285257304115a43defc82202d76b0f498f4c3 (diff) | |
download | gitlab-ce-267a909600e02f0728fec1765adf817acc03d813.tar.gz |
Remove edit_note and update_note abilities in favor of admin_note
Diffstat (limited to 'app/policies/note_policy.rb')
-rw-r--r-- | app/policies/note_policy.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/policies/note_policy.rb b/app/policies/note_policy.rb index d4cb5a77e63..2f6c579906c 100644 --- a/app/policies/note_policy.rb +++ b/app/policies/note_policy.rb @@ -8,14 +8,10 @@ class NotePolicy < BasePolicy condition(:editable, scope: :subject) { @subject.editable? } - rule { ~editable | anonymous }.prevent :edit_note - - rule { is_author | admin }.enable :edit_note - rule { can?(:master_access) }.enable :edit_note + rule { ~editable }.prevent :admin_note rule { is_author }.policy do enable :read_note - enable :update_note enable :admin_note enable :resolve_note end |