'general', 'title' => 'General', 'perms' => [ [ 'section' => 'can-manage', 'title' => 'Can access the management panel.', 'perm' => MSZ_PERM_GENERAL_CAN_MANAGE, ], [ 'section' => 'view-logs', 'title' => 'Can view audit logs.', 'perm' => MSZ_PERM_GENERAL_VIEW_LOGS, ], [ 'section' => 'manage-emotes', 'title' => 'Can manage emoticons.', 'perm' => MSZ_PERM_GENERAL_MANAGE_EMOTICONS, ], [ 'section' => 'manage-settings', 'title' => 'Can manage general Misuzu settings.', 'perm' => MSZ_PERM_GENERAL_MANAGE_SETTINGS, ], [ 'section' => 'tester', 'title' => 'Can use experimental features.', 'perm' => MSZ_PERM_GENERAL_TESTER, ], [ 'section' => 'manage-blacklist', 'title' => 'Can manage blacklistings.', 'perm' => MSZ_PERM_GENERAL_MANAGE_BLACKLIST, ], ], ], [ 'section' => 'user', 'title' => 'User', 'perms' => [ [ 'section' => 'edit-profile', 'title' => 'Can edit own profile.', 'perm' => MSZ_PERM_USER_EDIT_PROFILE, ], [ 'section' => 'change-avatar', 'title' => 'Can change own avatar.', 'perm' => MSZ_PERM_USER_CHANGE_AVATAR, ], [ 'section' => 'change-background', 'title' => 'Can change own background.', 'perm' => MSZ_PERM_USER_CHANGE_BACKGROUND, ], [ 'section' => 'edit-about', 'title' => 'Can change own about section.', 'perm' => MSZ_PERM_USER_EDIT_ABOUT, ], [ 'section' => 'edit-birthdate', 'title' => 'Can change own birthdate.', 'perm' => MSZ_PERM_USER_EDIT_BIRTHDATE, ], [ 'section' => 'edit-signature', 'title' => 'Can change own signature.', 'perm' => MSZ_PERM_USER_EDIT_SIGNATURE, ], [ 'section' => 'manage-users', 'title' => 'Can manage other users.', 'perm' => MSZ_PERM_USER_MANAGE_USERS, ], [ 'section' => 'manage-roles', 'title' => 'Can manage roles.', 'perm' => MSZ_PERM_USER_MANAGE_ROLES, ], [ 'section' => 'manage-perms', 'title' => 'Can manage permissions.', 'perm' => MSZ_PERM_USER_MANAGE_PERMS, ], [ 'section' => 'manage-reports', 'title' => 'Can handle reports.', 'perm' => MSZ_PERM_USER_MANAGE_REPORTS, ], [ 'section' => 'manage-warnings', 'title' => 'Can manage warnings, silences and bans.', 'perm' => MSZ_PERM_USER_MANAGE_WARNINGS, ], ], ], [ 'section' => 'news', 'title' => 'News', 'perms' => [ [ 'section' => 'manage-posts', 'title' => 'Can manage posts.', 'perm' => MSZ_PERM_NEWS_MANAGE_POSTS, ], [ 'section' => 'manage-cats', 'title' => 'Can manage catagories.', 'perm' => MSZ_PERM_NEWS_MANAGE_CATEGORIES, ], ], ], [ 'section' => 'forum', 'title' => 'Forum', 'perms' => [ [ 'section' => 'manage-forums', 'title' => 'Can manage forum sections.', 'perm' => MSZ_PERM_FORUM_MANAGE_FORUMS, ], ], ], [ 'section' => 'comments', 'title' => 'Comments', 'perms' => [ [ 'section' => 'create', 'title' => 'Can post comments.', 'perm' => MSZ_PERM_COMMENTS_CREATE, ], [ 'section' => 'delete-own', 'title' => 'Can delete own comments.', 'perm' => MSZ_PERM_COMMENTS_DELETE_OWN, ], [ 'section' => 'delete-any', 'title' => 'Can delete anyone\'s comments.', 'perm' => MSZ_PERM_COMMENTS_DELETE_ANY, ], [ 'section' => 'pin', 'title' => 'Can pin comments.', 'perm' => MSZ_PERM_COMMENTS_PIN, ], [ 'section' => 'lock', 'title' => 'Can lock comment threads.', 'perm' => MSZ_PERM_COMMENTS_LOCK, ], [ 'section' => 'vote', 'title' => 'Can like or dislike comments.', 'perm' => MSZ_PERM_COMMENTS_VOTE, ], ], ], [ 'section' => 'changelog', 'title' => 'Changelog', 'perms' => [ [ 'section' => 'manage-changes', 'title' => 'Can manage changes.', 'perm' => MSZ_PERM_CHANGELOG_MANAGE_CHANGES, ], [ 'section' => 'manage-tags', 'title' => 'Can manage tags.', 'perm' => MSZ_PERM_CHANGELOG_MANAGE_TAGS, ], [ 'section' => 'manage-actions', 'title' => 'Can manage action types.', 'perm' => MSZ_PERM_CHANGELOG_MANAGE_ACTIONS, ], ], ], ]); } function manage_forum_perms_list(array $rawPerms): array { return manage_perms_calculate($rawPerms, [ [ 'section' => 'forum', 'title' => 'Forum', 'perms' => [ [ 'section' => 'can-list', 'title' => 'Can see the forum listed, but not access it.', 'perm' => MSZ_FORUM_PERM_LIST_FORUM, ], [ 'section' => 'can-view', 'title' => 'Can view and access the forum.', 'perm' => MSZ_FORUM_PERM_VIEW_FORUM, ], [ 'section' => 'can-create-topic', 'title' => 'Can create topics.', 'perm' => MSZ_FORUM_PERM_CREATE_TOPIC, ], [ 'section' => 'can-move-topic', 'title' => 'Can move topics between forums.', 'perm' => MSZ_FORUM_PERM_MOVE_TOPIC, ], [ 'section' => 'can-lock-topic', 'title' => 'Can lock topics.', 'perm' => MSZ_FORUM_PERM_LOCK_TOPIC, ], [ 'section' => 'can-sticky-topic', 'title' => 'Can make topics sticky.', 'perm' => MSZ_FORUM_PERM_STICKY_TOPIC, ], [ 'section' => 'can-announce-topic', 'title' => 'Can make topics announcements.', 'perm' => MSZ_FORUM_PERM_ANNOUNCE_TOPIC, ], [ 'section' => 'can-global-announce-topic', 'title' => 'Can make topics global announcements.', 'perm' => MSZ_FORUM_PERM_GLOBAL_ANNOUNCE_TOPIC, ], [ 'section' => 'can-bump-topic', 'title' => 'Can bump topics without posting a reply.', 'perm' => MSZ_FORUM_PERM_BUMP_TOPIC, ], [ 'section' => 'can-create-post', 'title' => 'Can make posts (reply only, if create topic is disallowed).', 'perm' => MSZ_FORUM_PERM_CREATE_POST, ], [ 'section' => 'can-edit-post', 'title' => 'Can edit their own posts.', 'perm' => MSZ_FORUM_PERM_EDIT_POST, ], [ 'section' => 'can-edit-any-post', 'title' => 'Can edit any posts.', 'perm' => MSZ_FORUM_PERM_EDIT_ANY_POST, ], [ 'section' => 'can-delete-post', 'title' => 'Can delete own posts.', 'perm' => MSZ_FORUM_PERM_DELETE_POST, ], [ 'section' => 'can-delete-any-post', 'title' => 'Can delete any posts.', 'perm' => MSZ_FORUM_PERM_DELETE_ANY_POST, ], ], ], ]); }