diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/controllers/groups/boards_controller.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/controllers/groups/boards_controller.rb')
-rw-r--r-- | app/controllers/groups/boards_controller.rb | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb index 093cdf258b2..fa109021b7d 100644 --- a/app/controllers/groups/boards_controller.rb +++ b/app/controllers/groups/boards_controller.rb @@ -3,6 +3,7 @@ class Groups::BoardsController < Groups::ApplicationController include BoardsActions include RecordUserLastActivity + include Gitlab::Utils::StrongMemoize before_action :authorize_read_board!, only: [:index, :show] before_action :assign_endpoint_vars @@ -14,10 +15,32 @@ class Groups::BoardsController < Groups::ApplicationController private + def board_klass + Board + end + + def boards_finder + strong_memoize :boards_finder do + Boards::ListService.new(parent, current_user) + end + end + + def board_finder + strong_memoize :board_finder do + Boards::ListService.new(parent, current_user, board_id: params[:id]) + end + end + + def board_create_service + strong_memoize :board_create_service do + Boards::CreateService.new(parent, current_user) + end + end + def assign_endpoint_vars - @boards_endpoint = group_boards_url(group) + @boards_endpoint = group_boards_path(group) @namespace_path = group.to_param - @labels_endpoint = group_labels_url(group) + @labels_endpoint = group_labels_path(group) end def authorize_read_board! |