mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Instead of the deprecated 'min trust level to allow ignore' in order to reduce the number of deprecation notices in the logs. This tweaks a few serializers so that the 'can_ignore_users?` property is always coming from the server and properly used on the client-side.
139 lines
3.6 KiB
JavaScript
139 lines
3.6 KiB
JavaScript
import { deepFreeze } from "discourse-common/lib/object";
|
|
import {
|
|
AUTO_GROUPS,
|
|
} from "discourse/lib/constants";
|
|
|
|
export default {
|
|
"/session/current.json": deepFreeze({
|
|
current_user: {
|
|
id: 19,
|
|
username: "eviltrout",
|
|
uploaded_avatar_id: 5275,
|
|
avatar_template: "/user_avatar/localhost/eviltrout/{size}/5275.png",
|
|
name: "Robin Ward",
|
|
unread_notifications: 0,
|
|
unread_high_priority_notifications: 0,
|
|
admin: true,
|
|
notification_channel_position: null,
|
|
site_flagged_posts_count: 1,
|
|
moderator: true,
|
|
staff: true,
|
|
can_create_group: true,
|
|
can_create_topic: true,
|
|
title: "co-founder",
|
|
reply_count: 859,
|
|
topic_count: 36,
|
|
trust_level: 4,
|
|
can_edit: true,
|
|
can_invite_to_forum: true,
|
|
can_ignore_users: true,
|
|
can_mute_users: true,
|
|
can_send_private_messages: true,
|
|
custom_fields: {},
|
|
muted_category_ids: [],
|
|
dismissed_banner_key: null,
|
|
can_review: true,
|
|
ignored_users: [],
|
|
groups: [
|
|
AUTO_GROUPS.admins,
|
|
AUTO_GROUPS.moderators,
|
|
AUTO_GROUPS.staff,
|
|
AUTO_GROUPS.trust_level_0,
|
|
AUTO_GROUPS.trust_level_1,
|
|
AUTO_GROUPS.trust_level_2,
|
|
],
|
|
user_option: {
|
|
external_links_in_new_tab: false,
|
|
enable_quoting: true,
|
|
dynamic_favicon: true,
|
|
title_count_mode: "notifications",
|
|
timezone: "Australia/Brisbane",
|
|
skip_new_user_tips: false,
|
|
should_be_redirected_to_top: false,
|
|
},
|
|
sidebar_sections: [
|
|
{
|
|
id: 111,
|
|
title: "Community",
|
|
section_type: "community",
|
|
slug: "community",
|
|
links: [
|
|
{
|
|
id: 329,
|
|
name: "Topics",
|
|
value: "/latest",
|
|
icon: "layer-group",
|
|
external: false,
|
|
segment: "primary",
|
|
},
|
|
{
|
|
id: 330,
|
|
name: "Users",
|
|
value: "/u",
|
|
icon: "users",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
{
|
|
id: 331,
|
|
name: "About",
|
|
value: "/about",
|
|
icon: "info-circle",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
{
|
|
id: 332,
|
|
name: "Faq",
|
|
value: "/faq",
|
|
icon: "question-circle",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
{
|
|
id: 333,
|
|
name: "My Posts",
|
|
value: "/my/activity",
|
|
icon: "user",
|
|
external: false,
|
|
segment: "primary",
|
|
},
|
|
{
|
|
id: 334,
|
|
name: "Review",
|
|
value: "/review",
|
|
icon: "flag",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
{
|
|
id: 335,
|
|
name: "Admin",
|
|
value: "/admin",
|
|
icon: "wrench",
|
|
external: false,
|
|
segment: "primary",
|
|
},
|
|
{
|
|
id: 336,
|
|
name: "Groups",
|
|
value: "/g",
|
|
icon: "user-friends",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
{
|
|
id: 337,
|
|
name: "Badges",
|
|
value: "/badges",
|
|
icon: "certificate",
|
|
external: false,
|
|
segment: "secondary",
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
}),
|
|
};
|