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
|
2020-08-24 08:10:17 -04:00
|
|
|
push_frontend_feature_flag(:graphql_board_lists, group, default_enabled: false)
|
2019-10-15 05:06:09 -04:00
|
|
|
end
|
2018-02-19 14:06:16 -05:00
|
|
|
|
2020-10-06 08:08:38 -04:00
|
|
|
feature_category :boards
|
|
|
|
|
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
|