diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-11-10 10:23:44 +0000 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-11-28 21:24:19 -0300 |
commit | 3d7704ae5f62446b8b399c796c64d1f527666376 (patch) | |
tree | 05790324eef305e2c2198366c7faa3767b5db8d8 /lib/api/helpers.rb | |
parent | ec5d0472288cac599d76a27870804e86fe29ffaf (diff) | |
download | gitlab-ce-3d7704ae5f62446b8b399c796c64d1f527666376.tar.gz |
Merge branch 'zj-fix-label-creation-non-members' into 'security'
Fix label creation non members
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416
See merge request !2006
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 0d3ddb89dc3..79a83496eee 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -198,20 +198,6 @@ module API ActionController::Parameters.new(attrs).permit! end - # Helper method for validating all labels against its names - def validate_label_params(params) - errors = {} - - params[:labels].to_s.split(',').each do |label_name| - label = available_labels.find_or_initialize_by(title: label_name.strip) - next if label.valid? - - errors[label.title] = label.errors - end - - errors - end - # Checks the occurrences of datetime attributes, each attribute if present in the params hash must be in ISO 8601 # format (YYYY-MM-DDTHH:MM:SSZ) or a Bad Request error is invoked. # |