diff options
Diffstat (limited to 'lib/sidebars/admin/menus/spam_logs_menu.rb')
-rw-r--r-- | lib/sidebars/admin/menus/spam_logs_menu.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/sidebars/admin/menus/spam_logs_menu.rb b/lib/sidebars/admin/menus/spam_logs_menu.rb new file mode 100644 index 00000000000..d01cd636e13 --- /dev/null +++ b/lib/sidebars/admin/menus/spam_logs_menu.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +module Sidebars + module Admin + module Menus + class SpamLogsMenu < ::Sidebars::Menu + override :link + def link + admin_spam_logs_path + end + + override :title + def title + s_('Admin|Spam Logs') + end + + override :sprite_icon + def sprite_icon + 'spam' + end + + override :render? + def render? + current_user && current_user.can_admin_all_resources? && anti_spam_service_enabled? + end + + override :active_routes + def active_routes + { controller: :spam_logs } + end + end + end + end +end |