Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sidebars/context.rb')
-rw-r--r--lib/sidebars/context.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sidebars/context.rb b/lib/sidebars/context.rb
index d9ac2705aaf..b49776bed10 100644
--- a/lib/sidebars/context.rb
+++ b/lib/sidebars/context.rb
@@ -6,16 +6,19 @@
# values where the logic is in helpers.
module Sidebars
class Context
- attr_reader :current_user, :container
+ attr_reader :current_user, :container, :route_is_active, :is_super_sidebar
def initialize(current_user:, container:, **args)
@current_user = current_user
@container = container
+ @is_super_sidebar = false
args.each do |key, value|
singleton_class.public_send(:attr_reader, key) # rubocop:disable GitlabSecurity/PublicSend
instance_variable_set("@#{key}", value)
end
+
+ @route_is_active ||= ->(_) { false }
end
end
end