feat: harden support, localize knowledge and add operator availability [skip ci]
Source-only publication of reviewed commit 64e96a7f423673dc29ad56485be9fc79bce8af1c.
Passed in isolation: focused frontend/backend tests, race checks, TypeScript typecheck, lint, Go compilation, Flowgram build, and deterministic SDK build/tests.
Not accepted as a production release: Next.js export/native assembly remains blocked by environment memory limits; browser interaction and MySQL staging acceptance remain unverified. No production server, database/schema, runtime configuration, deployment, release tag, or workflow execution was performed.
Expected source tree: 0a4a7528e9.
This commit is contained in:
@@ -38,6 +38,7 @@ export type DashboardNavItemConfig = Omit<DashboardNavMenuItem, "title"> & {
|
||||
* admin can see the module.
|
||||
*/
|
||||
requiredPermission?: string;
|
||||
requiredAnyPermission?: readonly string[];
|
||||
};
|
||||
|
||||
export type DashboardNavSectionConfig = {
|
||||
@@ -51,6 +52,9 @@ function navItemVisible(
|
||||
superAdmin: boolean,
|
||||
permissionSet: Set<string>,
|
||||
): boolean {
|
||||
if (item.requiredAnyPermission) {
|
||||
return item.requiredAnyPermission.some((permission) => permissionSet.has(permission));
|
||||
}
|
||||
if (superAdmin) {
|
||||
return true;
|
||||
}
|
||||
@@ -264,6 +268,12 @@ export const dashboardNavSections: DashboardNavSectionConfig[] = [
|
||||
titleKey: "nav.system",
|
||||
icon: <ShieldCheckIcon />,
|
||||
items: [
|
||||
{
|
||||
titleKey: "supportAvailability.title",
|
||||
url: "/dashboard/support-availability",
|
||||
icon: <CalendarClockIcon />,
|
||||
requiredAnyPermission: ["supportConfig.view", "agentTeamSchedule.view"],
|
||||
},
|
||||
{
|
||||
titleKey: "nav.setupWizard",
|
||||
url: "/dashboard/setup",
|
||||
|
||||
Reference in New Issue
Block a user