Compare commits
No commits in common. "main-cloud" and "1.1.1-cloud.1" have entirely different histories.
main-cloud
...
1.1.1-clou
|
@ -33,13 +33,6 @@ export default function AdminLayout(props: AdminLayoutProps) {
|
|||
}
|
||||
}
|
||||
|
||||
function checkAllowAccessSetting() {
|
||||
const username = user?.username;
|
||||
const allowList = ['Endy', 'superadmin'];
|
||||
if (allowList.includes(username)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Header
|
||||
|
@ -88,15 +81,7 @@ export default function AdminLayout(props: AdminLayoutProps) {
|
|||
});
|
||||
},
|
||||
},
|
||||
]
|
||||
.map((item) => {
|
||||
const isAllowSetting = checkAllowAccessSetting();
|
||||
if (!isAllowSetting && (item.key === '1' || item.type === 'divider')) {
|
||||
return undefined;
|
||||
}
|
||||
return item;
|
||||
})
|
||||
.filter(Boolean) as any,
|
||||
],
|
||||
}}
|
||||
>
|
||||
<Avatar size={35} style={{ cursor: 'pointer' }}>
|
||||
|
|
Loading…
Reference in New Issue