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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8afbd0ca
Commit
8afbd0ca
authored
Oct 24, 2016
by
Phil Hughes
Committed by
Douglas Barbosa Alexandre
Oct 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hides multiple board actions if user doesnt have permissions
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/23678
parent
dee938f1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
118 deletions
+139
-118
app/views/projects/boards/_title.html.haml
app/views/projects/boards/_title.html.haml
+38
-36
spec/features/boards/multiple_boards_spec.rb
spec/features/boards/multiple_boards_spec.rb
+101
-82
No files found.
app/views/projects/boards/_title.html.haml
View file @
8afbd0ca
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
{{ board.name }}
{{ board.name }}
.dropdown-loading
{
"v-if"
=>
"loading"
}
.dropdown-loading
{
"v-if"
=>
"loading"
}
=
icon
(
"spin spinner"
)
=
icon
(
"spin spinner"
)
-
if
can?
(
current_user
,
:admin_list
,
@project
)
%board-selector-form
{
"inline-template"
=>
true
,
%board-selector-form
{
"inline-template"
=>
true
,
"v-if"
=>
"currentPage === 'edit'"
,
"v-if"
=>
"currentPage === 'edit'"
,
"type"
=>
"edit"
,
"type"
=>
"edit"
,
...
@@ -48,6 +49,7 @@
...
@@ -48,6 +49,7 @@
%button
.btn.btn-default.pull-right
{
type:
"button"
,
%button
.btn.btn-default.pull-right
{
type:
"button"
,
"@click.stop.prevent"
=>
"currentPage = ''"
}
"@click.stop.prevent"
=>
"currentPage = ''"
}
Cancel
Cancel
-
if
can?
(
current_user
,
:admin_list
,
@project
)
.dropdown-footer
{
"v-if"
=>
"currentPage === ''"
}
.dropdown-footer
{
"v-if"
=>
"currentPage === ''"
}
%ul
.dropdown-footer-list
%ul
.dropdown-footer-list
%li
%li
...
...
spec/features/boards/multiple_boards_spec.rb
View file @
8afbd0ca
...
@@ -10,6 +10,7 @@ describe 'Multiple Issue Boards', feature: true, js: true do
...
@@ -10,6 +10,7 @@ describe 'Multiple Issue Boards', feature: true, js: true do
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board2
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board2
)
{
create
(
:board
,
project:
project
)
}
context
'authorized user'
do
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
@@ -142,4 +143,22 @@ describe 'Multiple Issue Boards', feature: true, js: true do
...
@@ -142,4 +143,22 @@ describe 'Multiple Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.board'
,
count:
2
)
end
end
end
context
'unauthorized user'
do
before
do
visit
namespace_project_boards_path
(
project
.
namespace
,
project
)
wait_for_vue_resource
end
it
'does not show action links'
do
click_button
board
.
name
page
.
within
(
'.boards-title-holder .dropdown-menu'
)
do
expect
(
page
).
not_to
have_content
(
'Create new board'
)
expect
(
page
).
not_to
have_content
(
'Edit board name'
)
expect
(
page
).
not_to
have_content
(
'Delete board'
)
end
end
end
end
end
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