Commit 324067e2 authored by Phil Hughes's avatar Phil Hughes

Added correct permissions to the views

parent 27188763
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
methods: { methods: {
addDefaultLists: function () { addDefaultLists: function () {
BoardsStore.removeBlankState(); BoardsStore.removeBlankState();
_.each(this.predefinedLabels, (label, i) => { _.each(this.predefinedLabels, (label, i) => {
BoardsStore.addList({ BoardsStore.addList({
title: label.title, title: label.title,
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{{ list.title }} {{ list.title }}
%span.pull-right{ "v-if" => "list.type !== 'blank'" } %span.pull-right{ "v-if" => "list.type !== 'blank'" }
{{ list.issues.length }} {{ list.issues.length }}
- if current_user - if can?(current_user, :admin_list, @project)
%board-delete{ "inline-template" => true, %board-delete{ "inline-template" => true,
"v-if" => "!isPreset", "v-if" => "!isPreset",
":list" => "list" } ":list" => "list" }
...@@ -35,5 +35,5 @@ ...@@ -35,5 +35,5 @@
"v-show" => "!loading", "v-show" => "!loading",
":data-board" => "list.id" } ":data-board" => "list.id" }
= render "projects/boards/components/card" = render "projects/boards/components/card"
- if current_user - if can?(current_user, :admin_list, @project)
= render "projects/boards/components/blank_state" = render "projects/boards/components/blank_state"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.boards-list#board-app{ "v-cloak" => true, .boards-list#board-app{ "v-cloak" => true,
":endpoint" => "'#{namespace_project_board_path(@project.namespace, @project)}'", ":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)}'" } ":issue-link-base" => "'#{namespace_project_issues_path(@project.namespace, @project)}'" }
.boards-app-loading.text-center{ "v-if" => "loading" } .boards-app-loading.text-center{ "v-if" => "loading" }
= icon("spinner spin") = icon("spinner spin")
......
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