2018-09-23 19:44:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-19 19:06:16 +00:00
|
|
|
class Groups::BoardsController < Groups::ApplicationController
|
2019-02-26 17:26:26 +00:00
|
|
|
include BoardsActions
|
2019-02-05 14:55:31 +00:00
|
|
|
include RecordUserLastActivity
|
2018-02-19 19:06:16 +00:00
|
|
|
|
2020-02-11 03:09:13 +00:00
|
|
|
before_action :authorize_read_board!, only: [:index, :show]
|
2018-02-19 19:06:16 +00:00
|
|
|
before_action :assign_endpoint_vars
|
2019-10-15 09:06:09 +00:00
|
|
|
before_action do
|
2020-08-24 12:10:17 +00:00
|
|
|
push_frontend_feature_flag(:graphql_board_lists, group, default_enabled: false)
|
2020-06-04 09:08:01 +00:00
|
|
|
push_frontend_feature_flag(:boards_with_swimlanes, group, default_enabled: false)
|
2019-10-15 09:06:09 +00:00
|
|
|
end
|
2018-02-19 19:06:16 +00:00
|
|
|
|
2020-10-06 12:08:38 +00:00
|
|
|
feature_category :boards
|
|
|
|
|
2018-05-16 20:36:25 +00:00
|
|
|
private
|
|
|
|
|
2018-02-19 19:06:16 +00: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-11 03:09:13 +00:00
|
|
|
|
|
|
|
def authorize_read_board!
|
|
|
|
access_denied! unless can?(current_user, :read_board, group)
|
|
|
|
end
|
2018-02-19 19:06:16 +00:00
|
|
|
end
|