summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-04-02 19:05:47 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-10 15:46:20 +0200
commit267a909600e02f0728fec1765adf817acc03d813 (patch)
treebc3b43e72a5f09793ad9217d0d3ed0eedb0173a2 /app/policies
parentd18285257304115a43defc82202d76b0f498f4c3 (diff)
downloadgitlab-ce-267a909600e02f0728fec1765adf817acc03d813.tar.gz
Remove edit_note and update_note abilities in favor of admin_note
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/issuable_policy.rb2
-rw-r--r--app/policies/note_policy.rb6
2 files changed, 1 insertions, 7 deletions
diff --git a/app/policies/issuable_policy.rb b/app/policies/issuable_policy.rb
index e86d1c8f98e..b431d376e3d 100644
--- a/app/policies/issuable_policy.rb
+++ b/app/policies/issuable_policy.rb
@@ -18,9 +18,7 @@ class IssuablePolicy < BasePolicy
rule { locked & ~is_project_member }.policy do
prevent :create_note
- prevent :update_note
prevent :admin_note
prevent :resolve_note
- prevent :edit_note
end
end
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