Module: ProtectedRefsHelper
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/helpers/protected_refs_helper.rb
Instance Method Summary collapse
Instance Method Details
#protected_access_level_dropdown_roles ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/helpers/protected_refs_helper.rb', line 14 def protected_access_level_dropdown_roles roles = ProtectedRef::AccessLevel.human_access_levels.map do |id, text| { id: id, text: text, before_divider: true } end { roles: roles } end |
#protected_access_levels_for_dropdowns ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/helpers/protected_refs_helper.rb', line 6 def protected_access_levels_for_dropdowns { create_access_levels: protected_access_level_dropdown_roles, push_access_levels: protected_access_level_dropdown_roles, merge_access_levels: protected_access_level_dropdown_roles } end |