Add a rule to check if users can admin boards on a project

parent 8afbd0ca
......@@ -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
......
......@@ -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
......
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