diff --git a/app/assets/javascripts/boards/components/board_blank_state.js.es6 b/app/assets/javascripts/boards/components/board_blank_state.js.es6 index 1682d137de0..a9d94660fa0 100644 --- a/app/assets/javascripts/boards/components/board_blank_state.js.es6 +++ b/app/assets/javascripts/boards/components/board_blank_state.js.es6 @@ -13,7 +13,7 @@ methods: { addDefaultLists: function () { BoardsStore.removeBlankState(); - + _.each(this.predefinedLabels, (label, i) => { BoardsStore.addList({ title: label.title, diff --git a/app/views/projects/boards/components/_board.html.haml b/app/views/projects/boards/components/_board.html.haml index 8461c62d7d4..d7c8b5ed57f 100644 --- a/app/views/projects/boards/components/_board.html.haml +++ b/app/views/projects/boards/components/_board.html.haml @@ -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" diff --git a/app/views/projects/boards/show.html.haml b/app/views/projects/boards/show.html.haml index 700bcc21258..c02bda60b50 100644 --- a/app/views/projects/boards/show.html.haml +++ b/app/views/projects/boards/show.html.haml @@ -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")