mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Add per-user feature flag for the new notifications menu (#17490)
Co-authored-by: OsamaSayegh <asooomaasoooma90@gmail.com>
This commit is contained in:

committed by
GitHub

parent
92e1e43104
commit
845642ac46
@ -74,7 +74,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:experimental_sidebar_enabled,
|
||||
:status,
|
||||
:sidebar_category_ids,
|
||||
:sidebar_tag_names
|
||||
:sidebar_tag_names,
|
||||
:redesigned_user_menu_enabled
|
||||
|
||||
delegate :user_stat, to: :object, private: true
|
||||
delegate :any_posts, :draft_count, :pending_posts_count, :read_faq?, to: :user_stat
|
||||
@ -338,4 +339,11 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
def status
|
||||
UserStatusSerializer.new(object.user_status, root: false)
|
||||
end
|
||||
|
||||
def redesigned_user_menu_enabled
|
||||
if defined?(@redesigned_user_menu_enabled)
|
||||
return @redesigned_user_menu_enabled
|
||||
end
|
||||
@redesigned_user_menu_enabled = object.redesigned_user_menu_enabled?
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user