Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/serializers/issue_sidebar_basic_entity.rb
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/serializers/issue_sidebar_basic_entity.rb')
-rw-r--r--app/serializers/issue_sidebar_basic_entity.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/serializers/issue_sidebar_basic_entity.rb b/app/serializers/issue_sidebar_basic_entity.rb
index f93a42e5f98..9c6601afd5e 100644
--- a/app/serializers/issue_sidebar_basic_entity.rb
+++ b/app/serializers/issue_sidebar_basic_entity.rb
@@ -4,6 +4,12 @@ class IssueSidebarBasicEntity < IssuableSidebarBasicEntity
expose :due_date
expose :confidential
expose :severity
+
+ expose :current_user, merge: true do
+ expose :can_update_escalation_status, if: -> (issue, _) { issue.supports_escalation? } do |issue|
+ can?(current_user, :update_escalation_status, issue.project)
+ end
+ end
end
IssueSidebarBasicEntity.prepend_mod_with('IssueSidebarBasicEntity')