diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 03:09:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 03:09:13 +0000 |
commit | ea99abb145ed193c2ac5d19efbff3b8990a54c9c (patch) | |
tree | c4f3870175c3334d0842eb429b5395a7845c2528 /app | |
parent | a9104a50136e485c8dda7af37106332f9010a1e8 (diff) | |
download | gitlab-ce-ea99abb145ed193c2ac5d19efbff3b8990a54c9c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/boards/components/issue_card_inner.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/boards/models/issue.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/lib/utils/http_status.js | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/boards.scss | 4 | ||||
-rw-r--r-- | app/controllers/groups/boards_controller.rb | 5 | ||||
-rw-r--r-- | app/policies/group_policy.rb | 1 | ||||
-rw-r--r-- | app/services/ci/create_cross_project_pipeline_service.rb | 2 |
7 files changed, 21 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/components/issue_card_inner.vue b/app/assets/javascripts/boards/components/issue_card_inner.vue index 0e0d1e64f4a..bdaed17fd09 100644 --- a/app/assets/javascripts/boards/components/issue_card_inner.vue +++ b/app/assets/javascripts/boards/components/issue_card_inner.vue @@ -162,6 +162,14 @@ export default { <div class="d-flex board-card-header" dir="auto"> <h4 class="board-card-title append-bottom-0 prepend-top-0"> <icon + v-if="issue.blocked" + v-gl-tooltip + name="issue-block" + :title="__('Blocked issue')" + class="issue-blocked-icon append-right-4" + :aria-label="__('Blocked issue')" + /> + <icon v-if="issue.confidential" v-gl-tooltip name="eye-slash" diff --git a/app/assets/javascripts/boards/models/issue.js b/app/assets/javascripts/boards/models/issue.js index 1cee9e5725a..044d96a9aec 100644 --- a/app/assets/javascripts/boards/models/issue.js +++ b/app/assets/javascripts/boards/models/issue.js @@ -37,6 +37,7 @@ class ListIssue { this.project_id = obj.project_id; this.timeEstimate = obj.time_estimate; this.assignableLabelsEndpoint = obj.assignable_labels_endpoint; + this.blocked = obj.blocked; if (obj.project) { this.project = new IssueProject(obj.project); diff --git a/app/assets/javascripts/lib/utils/http_status.js b/app/assets/javascripts/lib/utils/http_status.js index 1c7d59054dc..08a77966bbd 100644 --- a/app/assets/javascripts/lib/utils/http_status.js +++ b/app/assets/javascripts/lib/utils/http_status.js @@ -19,6 +19,7 @@ const httpStatusCodes = { UNAUTHORIZED: 401, FORBIDDEN: 403, NOT_FOUND: 404, + CONFLICT: 409, GONE: 410, UNPROCESSABLE_ENTITY: 422, SERVICE_UNAVAILABLE: 503, diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss index 31e87d1a7cf..42d7b0d08f7 100644 --- a/app/assets/stylesheets/pages/boards.scss +++ b/app/assets/stylesheets/pages/boards.scss @@ -287,6 +287,10 @@ cursor: help; } + .issue-blocked-icon { + color: $red-500; + } + @include media-breakpoint-down(md) { padding: $gl-padding-8; } diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb index 8c9bf17f017..fab84fb8299 100644 --- a/app/controllers/groups/boards_controller.rb +++ b/app/controllers/groups/boards_controller.rb @@ -4,6 +4,7 @@ class Groups::BoardsController < Groups::ApplicationController include BoardsActions include RecordUserLastActivity + before_action :authorize_read_board!, only: [:index, :show] before_action :assign_endpoint_vars before_action do push_frontend_feature_flag(:multi_select_board, default_enabled: true) @@ -16,4 +17,8 @@ class Groups::BoardsController < Groups::ApplicationController @namespace_path = group.to_param @labels_endpoint = group_labels_url(group) end + + def authorize_read_board! + access_denied! unless can?(current_user, :read_board, group) + end end diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 1cd400e4dfa..3bb7ab05be2 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -67,6 +67,7 @@ class GroupPolicy < BasePolicy enable :read_milestone enable :read_list enable :read_label + enable :read_board end rule { has_access }.enable :read_namespace diff --git a/app/services/ci/create_cross_project_pipeline_service.rb b/app/services/ci/create_cross_project_pipeline_service.rb index a60793463b4..dd15fa8ddb8 100644 --- a/app/services/ci/create_cross_project_pipeline_service.rb +++ b/app/services/ci/create_cross_project_pipeline_service.rb @@ -30,7 +30,7 @@ module Ci end downstream_pipeline.tap do |pipeline| - @bridge.drop!(:downstream_pipeline_creation_failed) if pipeline.has_yaml_errors? + @bridge.drop!(:downstream_pipeline_creation_failed) if pipeline.errors.any? end end |