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>2021-04-20 17:36:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 17:36:54 +0300
commitf61bb2a16a514b71bf33aabbbb999d6732016a24 (patch)
tree9548caa89e60b4f40b99bbd1dac030420b812aa8 /app/helpers/boards_helper.rb
parent35fc54e5d261f8898e390aea7c2f5ec5fdf0539d (diff)
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc42
Diffstat (limited to 'app/helpers/boards_helper.rb')
-rw-r--r--app/helpers/boards_helper.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb
index b8c2255ab7e..49963d14934 100644
--- a/app/helpers/boards_helper.rb
+++ b/app/helpers/boards_helper.rb
@@ -14,7 +14,8 @@ module BoardsHelper
root_path: root_path,
full_path: full_path,
bulk_update_path: @bulk_issues_path,
- can_update: (!!can?(current_user, :admin_issue, board)).to_s,
+ can_update: can_update?.to_s,
+ can_admin_list: can_admin_list?.to_s,
time_tracking_limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s,
recent_boards_endpoint: recent_boards_path,
parent: current_board_parent.model_name.param_key,
@@ -88,6 +89,14 @@ module BoardsHelper
@current_board_parent ||= @group || @project
end
+ def can_update?
+ can?(current_user, :admin_issue, board)
+ end
+
+ def can_admin_list?
+ can?(current_user, :admin_issue_board_list, current_board_parent)
+ end
+
def can_admin_issue?
can?(current_user, :admin_issue, current_board_parent)
end