Added correct permissions to the views

This commit is contained in:
Phil Hughes 2016-08-09 10:25:07 +01:00
parent 271887632e
commit 324067e233
3 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@
methods: {
addDefaultLists: function () {
BoardsStore.removeBlankState();
_.each(this.predefinedLabels, (label, i) => {
BoardsStore.addList({
title: label.title,

View file

@ -11,7 +11,7 @@
{{ list.title }}
%span.pull-right{ "v-if" => "list.type !== 'blank'" }
{{ list.issues.length }}
- if current_user
- if can?(current_user, :admin_list, @project)
%board-delete{ "inline-template" => true,
"v-if" => "!isPreset",
":list" => "list" }
@ -35,5 +35,5 @@
"v-show" => "!loading",
":data-board" => "list.id" }
= render "projects/boards/components/card"
- if current_user
- if can?(current_user, :admin_list, @project)
= render "projects/boards/components/blank_state"

View file

@ -12,7 +12,7 @@
.boards-list#board-app{ "v-cloak" => true,
":endpoint" => "'#{namespace_project_board_path(@project.namespace, @project)}'",
":disabled" => "#{current_user.nil?}",
":disabled" => "#{!can?(current_user, :admin_list, @project)}",
":issue-link-base" => "'#{namespace_project_issues_path(@project.namespace, @project)}'" }
.boards-app-loading.text-center{ "v-if" => "loading" }
= icon("spinner spin")