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>2020-08-13 03:10:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-13 03:10:06 +0300
commit3827baae078970c1027461f01df090b885370c55 (patch)
tree65a0471270565047d0cb18de33a989f297fbde18 /app/helpers/branches_helper.rb
parent14245e7755fb19d2429aa6a85273097a6b2eb43f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/branches_helper.rb')
-rw-r--r--app/helpers/branches_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb
index 60c19e6fecd..2a0242fe2fa 100644
--- a/app/helpers/branches_helper.rb
+++ b/app/helpers/branches_helper.rb
@@ -8,6 +8,14 @@ module BranchesHelper
def protected_branch?(project, branch)
ProtectedBranch.protected?(project, branch.name)
end
+
+ def access_levels_data(access_levels)
+ return [] unless access_levels
+
+ access_levels.map do |level|
+ { id: level.id, type: :role, access_level: level.access_level }
+ end
+ end
end
BranchesHelper.prepend_if_ee('EE::BranchesHelper')