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:
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')