diff options
author | Mario de la Ossa <mdelaossa@gitlab.com> | 2018-06-07 20:54:24 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-07 20:54:24 +0000 |
commit | cf41aaba5ab9fb1d229807f77b2b77585d3550b0 (patch) | |
tree | 37405b49c29180d4fbf53efb3117163505ca0309 /app/controllers | |
parent | d4357afde55436a0fa3702d8d11bb8ae8a214381 (diff) | |
download | gitlab-ce-cf41aaba5ab9fb1d229807f77b2b77585d3550b0.tar.gz |
Backport of "Add assignee lists to boards"
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/boards/lists_controller.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/controllers/boards/lists_controller.rb b/app/controllers/boards/lists_controller.rb index 381fd4d7508..e8b5934f2a9 100644 --- a/app/controllers/boards/lists_controller.rb +++ b/app/controllers/boards/lists_controller.rb @@ -56,8 +56,12 @@ module Boards private + def list_creation_attrs + %i[label_id] + end + def list_params - params.require(:list).permit(:label_id) + params.require(:list).permit(list_creation_attrs) end def move_params @@ -65,11 +69,15 @@ module Boards end def serialize_as_json(resource) - resource.as_json( + resource.as_json(serialization_attrs) + end + + def serialization_attrs + { only: [:id, :list_type, :position], methods: [:title], label: true - ) + } end end end |