debian-mirror-gitlab/app/controllers/groups/boards_controller.rb

27 lines
791 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2018-03-27 19:54:05 +05:30
class Groups::BoardsController < Groups::ApplicationController
2019-07-07 11:18:12 +05:30
include BoardsActions
2019-03-02 22:35:43 +05:30
include RecordUserLastActivity
2018-03-27 19:54:05 +05:30
2020-03-13 15:44:24 +05:30
before_action :authorize_read_board!, only: [:index, :show]
2018-03-27 19:54:05 +05:30
before_action :assign_endpoint_vars
2019-12-21 20:55:43 +05:30
before_action do
2019-12-26 22:10:19 +05:30
push_frontend_feature_flag(:multi_select_board, default_enabled: true)
2020-04-22 19:07:51 +05:30
push_frontend_feature_flag(:sfc_issue_boards, default_enabled: true)
2020-06-23 00:09:42 +05:30
push_frontend_feature_flag(:boards_with_swimlanes, group, default_enabled: false)
2019-12-21 20:55:43 +05:30
end
2018-03-27 19:54:05 +05:30
2018-11-08 19:23:39 +05:30
private
2018-03-27 19:54:05 +05:30
def assign_endpoint_vars
@boards_endpoint = group_boards_url(group)
@namespace_path = group.to_param
@labels_endpoint = group_labels_url(group)
end
2020-03-13 15:44:24 +05:30
def authorize_read_board!
access_denied! unless can?(current_user, :read_board, group)
end
2018-03-27 19:54:05 +05:30
end