diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-22 11:50:41 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-29 16:04:28 -0300 |
commit | 4cccfc0f171944cd6f2ffaf49e48cf005dcf985e (patch) | |
tree | 1adc2b594dea43b8be009c7ff2c5d252872e0169 /app/services | |
parent | 68b3c8c2973a8fe1ee3f51091394acef2a25789d (diff) | |
download | gitlab-ce-4cccfc0f171944cd6f2ffaf49e48cf005dcf985e.tar.gz |
Fix issue boards leak private label names and descriptions
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/boards/lists/create_service.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/services/boards/lists/create_service.rb b/app/services/boards/lists/create_service.rb index 5cb408b9d20..b1887820bd4 100644 --- a/app/services/boards/lists/create_service.rb +++ b/app/services/boards/lists/create_service.rb @@ -3,7 +3,10 @@ module Boards class CreateService < Boards::BaseService def execute List.transaction do - create_list_at(next_position) + label = project.labels.find(params[:label_id]) + position = next_position + + create_list(label, position) end end @@ -14,8 +17,8 @@ module Boards max_position.nil? ? 0 : max_position.succ end - def create_list_at(position) - board.lists.create(params.merge(list_type: :label, position: position)) + def create_list(label, position) + board.lists.create(label: label, list_type: :label, position: position) end end end |