debian-mirror-gitlab/lib/sidebars/admin/base_menu.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
274 B
Ruby
Raw Normal View History

2023-06-20 00:43:36 +05:30
# frozen_string_literal: true
module Sidebars
module Admin
class BaseMenu < ::Sidebars::Menu
override :render?
def render?
return false unless context.current_user
context.current_user.can_admin_all_resources?
end
end
end
end