Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
97067682
Commit
97067682
authored
May 16, 2018
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE backport - Allow viewing only one board when multiple issue boards is not enabled
parent
f8568baa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
app/controllers/groups/boards_controller.rb
app/controllers/groups/boards_controller.rb
+8
-3
app/controllers/projects/boards_controller.rb
app/controllers/projects/boards_controller.rb
+6
-3
No files found.
app/controllers/groups/boards_controller.rb
View file @
97067682
...
@@ -2,19 +2,24 @@ class Groups::BoardsController < Groups::ApplicationController
...
@@ -2,19 +2,24 @@ class Groups::BoardsController < Groups::ApplicationController
include
BoardsResponses
include
BoardsResponses
before_action
:assign_endpoint_vars
before_action
:assign_endpoint_vars
before_action
:boards
,
only: :index
def
index
def
index
@boards
=
Boards
::
ListService
.
new
(
group
,
current_user
).
execute
respond_with_boards
respond_with_boards
end
end
def
show
def
show
@board
=
group
.
boards
.
find
(
params
[
:id
])
@board
=
boards
.
find
(
params
[
:id
])
respond_with_board
respond_with_board
end
end
private
def
boards
@boards
||=
Boards
::
ListService
.
new
(
group
,
current_user
).
execute
end
def
assign_endpoint_vars
def
assign_endpoint_vars
@boards_endpoint
=
group_boards_url
(
group
)
@boards_endpoint
=
group_boards_url
(
group
)
@namespace_path
=
group
.
to_param
@namespace_path
=
group
.
to_param
...
...
app/controllers/projects/boards_controller.rb
View file @
97067682
...
@@ -4,22 +4,25 @@ class Projects::BoardsController < Projects::ApplicationController
...
@@ -4,22 +4,25 @@ class Projects::BoardsController < Projects::ApplicationController
before_action
:check_issues_available!
before_action
:check_issues_available!
before_action
:authorize_read_board!
,
only:
[
:index
,
:show
]
before_action
:authorize_read_board!
,
only:
[
:index
,
:show
]
before_action
:boards
,
only: :index
before_action
:assign_endpoint_vars
before_action
:assign_endpoint_vars
def
index
def
index
@boards
=
Boards
::
ListService
.
new
(
project
,
current_user
).
execute
respond_with_boards
respond_with_boards
end
end
def
show
def
show
@board
=
project
.
boards
.
find
(
params
[
:id
])
@board
=
boards
.
find
(
params
[
:id
])
respond_with_board
respond_with_board
end
end
private
private
def
boards
@boards
||=
Boards
::
ListService
.
new
(
project
,
current_user
).
execute
end
def
assign_endpoint_vars
def
assign_endpoint_vars
@boards_endpoint
=
project_boards_path
(
project
)
@boards_endpoint
=
project_boards_path
(
project
)
@bulk_issues_path
=
bulk_update_project_issues_path
(
project
)
@bulk_issues_path
=
bulk_update_project_issues_path
(
project
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment