Commit 56ea6b12 authored by Florie Guibert's avatar Florie Guibert

Epic Boards - Add Boards navigation item under Epics

Review feedback
parent c2323a99
# frozen_string_literal: true # frozen_string_literal: true
class Groups::EpicBoardsController < Groups::BoardsController class Groups::EpicBoardsController < Groups::BoardsController
include BoardsActions include BoardsActions
before_action :authorize_read_board!, only: [:index] before_action :authorize_read_board!, only: [:index]
def authorize_read_board! def authorize_read_board!
access_denied! unless can?(current_user, :read_epic_board, group) access_denied! unless Feature.enabled?(:epic_boards, group) && can?(current_user, :read_epic_board, group)
end end
end end
...@@ -11,8 +11,6 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -11,8 +11,6 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
patch :override, on: :member patch :override, on: :member
end end
get '/epics/boards', to: redirect('groups/%{group_id}/-/epic_boards')
get '/analytics', to: redirect('groups/%{group_id}/-/analytics/value_stream_analytics') get '/analytics', to: redirect('groups/%{group_id}/-/analytics/value_stream_analytics')
resource :contribution_analytics, only: [:show] resource :contribution_analytics, only: [:show]
...@@ -114,10 +112,6 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -114,10 +112,6 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ }
end end
collection do
resources :boards, only: [:index, :show], as: 'epic_boards'
end
collection do collection do
post :bulk_update post :bulk_update
end end
...@@ -144,9 +138,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do ...@@ -144,9 +138,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
end end
end end
resources :epic_boards, only: [:index] do resources :epic_boards, only: [:index]
resources :lists, module: :boards, only: [:index]
end
namespace :security do namespace :security do
resource :dashboard, only: [:show], controller: :dashboard resource :dashboard, only: [:show], controller: :dashboard
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment