2018-09-23 15:44:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
class Groups::BoardsController < Groups::ApplicationController
|
2019-02-26 12:26:26 -05:00
|
|
|
include BoardsActions
|
2019-02-05 09:55:31 -05:00
|
|
|
include RecordUserLastActivity
|
2018-02-19 14:06:16 -05:00
|
|
|
|
2020-02-10 22:09:13 -05:00
|
|
|
before_action :authorize_read_board!, only: [:index, :show]
|
2018-02-19 14:06:16 -05:00
|
|
|
before_action :assign_endpoint_vars
|
2019-10-15 05:06:09 -04:00
|
|
|
before_action do
|
2019-11-14 07:06:30 -05:00
|
|
|
push_frontend_feature_flag(:multi_select_board, default_enabled: true)
|
2020-04-02 14:08:11 -04:00
|
|
|
push_frontend_feature_flag(:sfc_issue_boards, default_enabled: true)
|
2019-10-15 05:06:09 -04:00
|
|
|
end
|
2018-02-19 14:06:16 -05:00
|
|
|
|
2018-05-16 16:36:25 -04:00
|
|
|
private
|
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
def assign_endpoint_vars
|
|
|
|
@boards_endpoint = group_boards_url(group)
|
|
|
|
@namespace_path = group.to_param
|
|
|
|
@labels_endpoint = group_labels_url(group)
|
|
|
|
end
|
2020-02-10 22:09:13 -05:00
|
|
|
|
|
|
|
def authorize_read_board!
|
|
|
|
access_denied! unless can?(current_user, :read_board, group)
|
|
|
|
end
|
2018-02-19 14:06:16 -05:00
|
|
|
end
|