DEV: show admin moderation flags UI (#28071)

The page was hidden behind a feature flag in this PR https://github.com/discourse/discourse/pull/27756

It is now in a shippable state.
This commit is contained in:
Krzysztof Kotlarek
2024-07-25 15:24:17 +10:00
committed by GitHub
parent 31d3984e50
commit 205a2bf0d6
6 changed files with 17 additions and 40 deletions

View File

@@ -76,7 +76,6 @@ class CurrentUserSerializer < BasicUserSerializer
:can_view_raw_email,
:use_glimmer_topic_list?,
:login_method,
:show_experimental_flags_admin_page,
:render_experimental_about_page
delegate :user_stat, to: :object, private: true
@@ -142,18 +141,10 @@ class CurrentUserSerializer < BasicUserSerializer
object.staff?
end
def show_experimental_flags_admin_page
object.in_any_groups?(SiteSetting.experimental_flags_admin_page_enabled_groups_map)
end
def render_experimental_about_page
object.in_any_groups?(SiteSetting.experimental_redesigned_about_page_groups_map)
end
def include_show_experimental_flags_admin_page?
object.admin?
end
def can_post_anonymously
SiteSetting.allow_anonymous_posting &&
(is_anonymous || object.in_any_groups?(SiteSetting.anonymous_posting_allowed_groups_map))