summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorDietrich Stein <dstein@gitlab.com>2019-07-17 13:10:23 -0400
committerDietrich Stein <dstein@gitlab.com>2019-07-17 13:10:23 -0400
commitc6a2c8f673da4e4e32b15a5b563b25b474bcc263 (patch)
tree739819c3f9b61b35e0097835ce67fab6dc50e218 /lib/api/projects.rb
parent9bd4025b21f3ba65cde7755457111db799ef6744 (diff)
parent2860cfaaff0a435792081b72a5f97de85e0d4f70 (diff)
downloadgitlab-ce-ds-charts-whitespace.tar.gz
Merge branch 'master' into ds-charts-whitespaceds-charts-whitespace
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index a7d62014509..0923d31f5ff 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -145,6 +145,7 @@ module API
post do
attrs = declared_params(include_missing: false)
attrs = translate_params_for_compatibility(attrs)
+ filter_attributes_using_license!(attrs)
project = ::Projects::CreateService.new(current_user, attrs).execute
if project.saved?
@@ -179,6 +180,7 @@ module API
attrs = declared_params(include_missing: false)
attrs = translate_params_for_compatibility(attrs)
+ filter_attributes_using_license!(attrs)
project = ::Projects::CreateService.new(user, attrs).execute
if project.saved?
@@ -292,7 +294,7 @@ module API
authorize! :change_visibility_level, user_project if attrs[:visibility].present?
attrs = translate_params_for_compatibility(attrs)
-
+ filter_attributes_using_license!(attrs)
verify_update_project_attrs!(user_project, attrs)
result = ::Projects::UpdateService.new(user_project, current_user, attrs).execute