fix(admin): make forum settings pages auditable
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
374de05059
commit
51d5b8a2a1
3 files changed
+118
-55
No files matched your search
@@ -1,27 +1,73 @@
|
||||
import { renderFaIcon, schemaPage } from './helpers'
|
||||
|
||||
const pages = [
|
||||
['general', '全局设置'],
|
||||
['home', '首页与列表'],
|
||||
['publishing', '发布与审核'],
|
||||
['access', '权限与版主'],
|
||||
['replies', '回复与互动'],
|
||||
['payment', '付费与积分'],
|
||||
['urls', '链接设置'],
|
||||
]
|
||||
|
||||
export const forumSection = {
|
||||
key: 'forum',
|
||||
label: '社区论坛',
|
||||
icon: renderFaIcon('fa fas fa-comments'),
|
||||
route: '/forum',
|
||||
children: pages.map(([key, label]) => schemaPage({
|
||||
key: `forum-${key}`,
|
||||
name: `Forum_${key}`,
|
||||
label,
|
||||
title: label,
|
||||
route: `/forum/${key}`,
|
||||
canonicalDomain: 'forum',
|
||||
section: key,
|
||||
})),
|
||||
children: [
|
||||
schemaPage({
|
||||
key: 'forum-general',
|
||||
name: 'Forum_general',
|
||||
label: '全局设置',
|
||||
title: '全局设置',
|
||||
route: '/forum/general',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'general',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-home',
|
||||
name: 'Forum_home',
|
||||
label: '首页与列表',
|
||||
title: '首页与列表',
|
||||
route: '/forum/home',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'home',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-publishing',
|
||||
name: 'Forum_publishing',
|
||||
label: '发布与审核',
|
||||
title: '发布与审核',
|
||||
route: '/forum/publishing',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'publishing',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-access',
|
||||
name: 'Forum_access',
|
||||
label: '权限与版主',
|
||||
title: '权限与版主',
|
||||
route: '/forum/access',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'access',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-replies',
|
||||
name: 'Forum_replies',
|
||||
label: '回复与互动',
|
||||
title: '回复与互动',
|
||||
route: '/forum/replies',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'replies',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-payment',
|
||||
name: 'Forum_payment',
|
||||
label: '付费与积分',
|
||||
title: '付费与积分',
|
||||
route: '/forum/payment',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'payment',
|
||||
}),
|
||||
schemaPage({
|
||||
key: 'forum-urls',
|
||||
name: 'Forum_urls',
|
||||
label: '链接设置',
|
||||
title: '链接设置',
|
||||
route: '/forum/urls',
|
||||
canonicalDomain: 'forum',
|
||||
section: 'urls',
|
||||
}),
|
||||
],
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-11-03T09:49:39+00:00",
|
||||
"generated_at": "2026-11-11T06:33:58+00:00",
|
||||
"errors": [],
|
||||
"warnings": [
|
||||
"customPage tools-update section 'tools/update' not in PHP schema (ok if pure operational page)",
|
||||
@@ -55,9 +55,9 @@
|
||||
"enum incomplete parse for 'weixingzh_gzh_type' (php subset of js): php=[service] js=[service,subscribe]"
|
||||
],
|
||||
"info": [
|
||||
"PHP schema domains: global, page_display, post_list, permissions, users, payment, extensions, tools, ExtensionsAudit, ExtensionsIP, ExtensionsPush, ExtensionsSecurity, ExtensionsSystem, ToolsBackup, ToolsHealth, ToolsImportExport, PostListList",
|
||||
"Menu pages discovered: 61",
|
||||
"admin build ok; chunks=33"
|
||||
"PHP schema domains: global, page_display, post_list, permissions, users, payment, extensions, tools, forum, ExtensionsAudit, ExtensionsIP, ExtensionsPush, ExtensionsSecurity, ExtensionsSystem, ToolsBackup, ToolsHealth, ToolsImportExport, PostListList",
|
||||
"Menu pages discovered: 69",
|
||||
"admin build ok; chunks=34"
|
||||
],
|
||||
"domains": {
|
||||
"global": {
|
||||
@@ -85,6 +85,7 @@
|
||||
"homepage",
|
||||
"other",
|
||||
"tag",
|
||||
"topics",
|
||||
"user-home"
|
||||
],
|
||||
"files": [
|
||||
@@ -171,6 +172,20 @@
|
||||
"src/Admin/Schema/SchemaTools.php"
|
||||
]
|
||||
},
|
||||
"forum": {
|
||||
"sections": [
|
||||
"access",
|
||||
"general",
|
||||
"home",
|
||||
"payment",
|
||||
"publishing",
|
||||
"replies",
|
||||
"urls"
|
||||
],
|
||||
"files": [
|
||||
"src/Admin/Schema/SchemaForum.php"
|
||||
]
|
||||
},
|
||||
"ExtensionsAudit": {
|
||||
"sections": [
|
||||
"audit"
|
||||
@@ -244,45 +259,46 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"page_count": 61,
|
||||
"page_count": 69,
|
||||
"build": {
|
||||
"present": true,
|
||||
"entry": true,
|
||||
"missing_chunks": [],
|
||||
"chunks": [
|
||||
"SchemaPage.nbpKWBDL.js",
|
||||
"vendor-vue.CibbKclz.js",
|
||||
"FaIcon.DB-L86Cm.js",
|
||||
"useCollapsibleItems.DZpGrxDC.js",
|
||||
"vendor-draggable.CJPlJ2VA.js",
|
||||
"FaIconPicker.BAwAiMfQ.js",
|
||||
"shared-api.CBZ9FiMu.js",
|
||||
"vendor-misc.DkFG_sHo.js",
|
||||
"JioColorPicker.QfaAsnV3.js",
|
||||
"sortable-options.CCWOkUQx.js",
|
||||
"SchemaPage.wkJsLMel.js",
|
||||
"vendor-vue.BM0vN-Wz.js",
|
||||
"FaIcon.Ds68aqiD.js",
|
||||
"JioSaveBar.BdEi_zTr.js",
|
||||
"vendor-draggable.5YRIqfGD.js",
|
||||
"FaIconPicker.DjGcYEE6.js",
|
||||
"shared-api.CqULl4tK.js",
|
||||
"useCollapsibleItems.CkPTwN55.js",
|
||||
"vendor-misc.BfmdgLRe.js",
|
||||
"JioColorPicker.BPg00gwG.js",
|
||||
"sortable-options.BC3f3HvT.js",
|
||||
"level.BzX407It.js",
|
||||
"badge.on0sWygn.js",
|
||||
"vendor-naive.Dfu2WQKq.js",
|
||||
"DeferredPage._-8ZQ7kA.js",
|
||||
"NativeOpsRedirect.zFnHF1SN.js",
|
||||
"FloatingButtonsSettings.DOwK-RTG.js",
|
||||
"PageHeader.nyzEkEki.js",
|
||||
"FooterTabbarSettings.tb4NL7kN.js",
|
||||
"PostPageSettings.C4aWDAvO.js",
|
||||
"CommentSettings.DNlrCxSG.js",
|
||||
"PermissionsCapabilities.DqpqZWmL.js",
|
||||
"CmsCredits.B6Gorymm.js",
|
||||
"ThemeInfoPage.D4pAf5Wr.js",
|
||||
"ThemeAuthorizationPage.dha7vRbS.js",
|
||||
"DocsPage.Vq5ivh2L.js",
|
||||
"UsersVerify.DQdIZBGv.js",
|
||||
"UsersLevel.9dYF2o-O.js",
|
||||
"UsersBadge.CDPcEJ-D.js",
|
||||
"UsersWechatTemplate.CCecYMLT.js",
|
||||
"UsersTicket.Y46bme7L.js",
|
||||
"ToolsImportExport.BxHqqdz0.js",
|
||||
"ToolsHealth.DrJqHumh.js",
|
||||
"ToolsUpdate.rL8TduLs.js"
|
||||
"vendor-naive.56Pv_452.js",
|
||||
"DeferredPage.CwiEhxs0.js",
|
||||
"NativeOpsRedirect.oNAU91Zd.js",
|
||||
"FloatingButtonsSettings.BrqrpLot.js",
|
||||
"PageHeader.DIqgZ7mf.js",
|
||||
"FooterTabbarSettings.eSICmh8e.js",
|
||||
"PostPageSettings.DjmlAOE3.js",
|
||||
"CommentSettings.rUj5s8n8.js",
|
||||
"PermissionsCapabilities.CGd3Okap.js",
|
||||
"CmsCredits.m-e0h6yI.js",
|
||||
"ThemeInfoPage.Ozwlfda5.js",
|
||||
"ThemeAuthorizationPage.Ba1mFuud.js",
|
||||
"DocsPage.DyuJJExh.js",
|
||||
"UsersVerify.BSIiPp_M.js",
|
||||
"UsersLevel.l0ws__c2.js",
|
||||
"UsersBadge.CuwaTsrT.js",
|
||||
"UsersWechatTemplate.kHy-1ECS.js",
|
||||
"UsersTicket.PyAlGVR5.js",
|
||||
"ToolsImportExport.AhC1ibol.js",
|
||||
"ToolsHealth.CjcC22x0.js",
|
||||
"ToolsUpdate.DrhhDbIW.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -141,6 +141,7 @@ function collect_php_schema_sections(string $themeRoot): array {
|
||||
'extensions' => $themeRoot . '/src/Admin/Schema/SchemaExtensions.php',
|
||||
'tools' => $themeRoot . '/src/Admin/Schema/SchemaTools.php',
|
||||
'shop' => $themeRoot . '/src/Admin/Schema/SchemaShop.php',
|
||||
'forum' => $themeRoot . '/src/Admin/Schema/SchemaForum.php',
|
||||
];
|
||||
|
||||
foreach ($primary as $domain => $file) {
|
||||
|
||||
Reference in new issue
Block a user