summaryrefslogtreecommitdiff
path: root/lib/api/snippets.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 12:08:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 12:08:38 +0000
commit5ad0cf26551baff8f08af8562a8d45e6ec14d71a (patch)
tree57f1a6bad31bcd11efacd3fdfb9cc92f88fb6a86 /lib/api/snippets.rb
parentf47c768fad17d4c876e96524f83f8306f071db66 (diff)
downloadgitlab-ce-5ad0cf26551baff8f08af8562a8d45e6ec14d71a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r--lib/api/snippets.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/snippets.rb b/lib/api/snippets.rb
index a7dab373b7f..b5df036c5ca 100644
--- a/lib/api/snippets.rb
+++ b/lib/api/snippets.rb
@@ -106,7 +106,7 @@ module API
snippet = snippets_for_current_user.find_by_id(params.delete(:id))
break not_found!('Snippet') unless snippet
- authorize! :update_personal_snippet, snippet
+ authorize! :update_snippet, snippet
attrs = declared_params(include_missing: false).merge(request: request, api: true)
service_response = ::Snippets::UpdateService.new(nil, current_user, attrs).execute(snippet)
@@ -132,7 +132,7 @@ module API
snippet = snippets_for_current_user.find_by_id(params.delete(:id))
break not_found!('Snippet') unless snippet
- authorize! :admin_personal_snippet, snippet
+ authorize! :admin_snippet, snippet
destroy_conditionally!(snippet) do |snippet|
service = ::Snippets::DestroyService.new(current_user, snippet)