diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-09 17:17:01 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-10 13:19:43 +0200 |
commit | beed70c0248fea13bdf727e5f14dee362b0cd298 (patch) | |
tree | 06a8fca1cf4dfcbd60b3dedfd96dda4adf778943 /lib/api/notes.rb | |
parent | d74a8900e27a98f1c921052d2fc44f38cc63a2ea (diff) | |
download | gitlab-ce-feature-flags.tar.gz |
Use feature flags for notes and award emojisfeature-flags
This allows us to disable creating/updating/removing of notes as well as
toggling of award emojis.
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r-- | lib/api/notes.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb index d4fcfd3d4d3..eeb7e87a3bd 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -71,6 +71,7 @@ module API # POST /projects/:id/issues/:noteable_id/notes # POST /projects/:id/snippets/:noteable_id/notes post ":id/#{noteables_str}/:#{noteable_id_str}/notes" do + require_feature! :creating_notes required_attributes! [:body] opts = { @@ -103,6 +104,7 @@ module API # PUT /projects/:id/issues/:noteable_id/notes/:note_id # PUT /projects/:id/snippets/:noteable_id/notes/:node_id put ":id/#{noteables_str}/:#{noteable_id_str}/notes/:note_id" do + require_feature! :updating_notes required_attributes! [:body] note = user_project.notes.find(params[:note_id]) @@ -132,6 +134,7 @@ module API # DELETE /projects/:id/issues/:noteable_id/notes/:note_id # DELETE /projects/:id/snippets/:noteable_id/notes/:node_id delete ":id/#{noteables_str}/:#{noteable_id_str}/notes/:note_id" do + require_feature! :removing_notes note = user_project.notes.find(params[:note_id]) authorize! :admin_note, note |