Skip to content
Snippets Groups Projects

Add `admin_runners` custom role permission

Merged mo khan requested to merge mokhax/442851/admin_runners into master
All threads resolved!
Compare and Show latest version
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -54,13 +54,13 @@ def enabled_menu_items
custom_roles_menu_items
end
alias_method :build, :send
def custom_roles_menu_items
return [] unless context.current_user
PERMITTABLE_MENU_ITEMS.filter_map do |(menu_item, permissions)|
# rubocop:disable GitlabSecurity/PublicSend -- call private method in base class from fixed list of keys
send(menu_item) if allowed_any?(*permissions)
# rubocop:enable GitlabSecurity/PublicSend
build(menu_item) if allowed_any?(*permissions)
end
end
Loading