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
bb1b8fbc
Commit
bb1b8fbc
authored
Oct 24, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a rule to check if users can admin boards on a project
parent
8afbd0ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/policies/project_policy.rb
app/policies/project_policy.rb
+1
-0
app/views/projects/boards/_title.html.haml
app/views/projects/boards/_title.html.haml
+2
-2
No files found.
app/policies/project_policy.rb
View file @
bb1b8fbc
...
...
@@ -58,6 +58,7 @@ class ProjectPolicy < BasePolicy
can!
:update_issue
can!
:admin_issue
can!
:admin_label
can!
:admin_board
can!
:admin_list
can!
:read_commit_status
can!
:read_build
...
...
app/views/projects/boards/_title.html.haml
View file @
bb1b8fbc
...
...
@@ -23,7 +23,7 @@
{{ board.name }}
.dropdown-loading
{
"v-if"
=>
"loading"
}
=
icon
(
"spin spinner"
)
-
if
can?
(
current_user
,
:admin_
list
,
@project
)
-
if
can?
(
current_user
,
:admin_
board
,
@project
)
%board-selector-form
{
"inline-template"
=>
true
,
"v-if"
=>
"currentPage === 'edit'"
,
"type"
=>
"edit"
,
...
...
@@ -49,7 +49,7 @@
%button
.btn.btn-default.pull-right
{
type:
"button"
,
"@click.stop.prevent"
=>
"currentPage = ''"
}
Cancel
-
if
can?
(
current_user
,
:admin_
list
,
@project
)
-
if
can?
(
current_user
,
:admin_
board
,
@project
)
.dropdown-footer
{
"v-if"
=>
"currentPage === ''"
}
%ul
.dropdown-footer-list
%li
...
...
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