diff options
Diffstat (limited to 'lib/sidebars/user_profile/base_menu.rb')
-rw-r--r-- | lib/sidebars/user_profile/base_menu.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sidebars/user_profile/base_menu.rb b/lib/sidebars/user_profile/base_menu.rb new file mode 100644 index 00000000000..5594d7c3c65 --- /dev/null +++ b/lib/sidebars/user_profile/base_menu.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Sidebars + module UserProfile + class BaseMenu < ::Sidebars::Menu + override :render? + def render? + can?(context.current_user, :read_user_profile, context.container) + end + end + end +end |