fix(admin): 客服可在经营站点后台看到分销管理
- 分销管理分组去掉 legacyOnly 冻结,改为按子项权限显示;经营站点后台 (tenant 上下文)不再只对超管可见,持有 distribution:*/qrcode:* 的角色都能进入 - 租户后台历史分销守卫由「仅超管放行」改为「超管或持有任一 distribution:*/qrcode:* 权限放行」,逐接口仍由 requirePerm 校验,无权限账号继续 403 - 新增迁移 000116:cs 角色补 distribution:site_view / rule_view / order_view / settlement_view(二维码池 qrcode:view/manage 原本已有) - 补充守卫用例:客服持分销权限放行、仅二维码池权限放行、无分销权限 403
This commit is contained in:
@@ -86,7 +86,6 @@ interface NavGroup {
|
||||
icon: Component
|
||||
children: NavItem[]
|
||||
tenantOnly?: boolean
|
||||
legacyOnly?: boolean
|
||||
}
|
||||
|
||||
const allNavGroups: NavGroup[] = [
|
||||
@@ -162,10 +161,11 @@ const allNavGroups: NavGroup[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
// 分销管理按权限展示:持有 distribution:*/qrcode:* 的角色(含客服的分站二维码池维护)
|
||||
// 在经营站点后台同样可见,未授权的角色不会看到该分组。
|
||||
label: '分销管理',
|
||||
index: 'distribution',
|
||||
icon: Share,
|
||||
legacyOnly: true,
|
||||
children: [
|
||||
{
|
||||
label: '分销站点管理',
|
||||
@@ -406,7 +406,7 @@ const navGroups = computed(() => {
|
||||
}
|
||||
return allNavGroups
|
||||
.filter(group => {
|
||||
if (group.legacyOnly) return !siteStore.isTenant || adminSession.isSuperAdmin
|
||||
// 分组可见性由子项权限决定:子项全部无权时分组会在下方被过滤掉。
|
||||
if (group.tenantOnly) return siteStore.isTenant
|
||||
return true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user