mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-14 23:38:53 +00:00
@@ -221,23 +221,25 @@ export function Header() {
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Container>
|
</Container>
|
||||||
{showElevated && (user?.is_superuser || user?.is_staff) && (
|
{showSuperuserAlert &&
|
||||||
<Paper p={0} m={5}>
|
showElevated &&
|
||||||
<Alert
|
(user?.is_superuser || user?.is_staff) && (
|
||||||
icon={<IconUserBolt />}
|
<Paper p={0} m={5}>
|
||||||
color={user.is_superuser ? 'red' : 'orange'}
|
<Alert
|
||||||
title={user.is_superuser ? t`Superuser Mode` : t`Admin Mode`}
|
icon={<IconUserBolt />}
|
||||||
withCloseButton
|
color={user.is_superuser ? 'red' : 'orange'}
|
||||||
onClose={() => setShowSuperuserAlert(false)}
|
title={user.is_superuser ? t`Superuser Mode` : t`Admin Mode`}
|
||||||
p={5}
|
withCloseButton
|
||||||
>
|
onClose={() => setShowSuperuserAlert(false)}
|
||||||
<Text p={0}>
|
p={5}
|
||||||
{t`The current user has elevated privileges and should not be used for regular usage.`}{' '}
|
>
|
||||||
{errorCodeLink('INVE-W14')}
|
<Text p={0}>
|
||||||
</Text>
|
{t`The current user has elevated privileges and should not be used for regular usage.`}{' '}
|
||||||
</Alert>
|
{errorCodeLink('INVE-W14')}
|
||||||
</Paper>
|
</Text>
|
||||||
)}
|
</Alert>
|
||||||
|
</Paper>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user