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