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/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