mirror of
https://github.com/inventree/InvenTree.git
synced 2026-06-11 19:27:02 +00:00
[UI] User management spotlight (#12144)
Add spotlight action to quickly jump to user management panel
This commit is contained in:
@@ -9,7 +9,8 @@ import {
|
|||||||
IconSettings,
|
IconSettings,
|
||||||
IconTags,
|
IconTags,
|
||||||
IconUserBolt,
|
IconUserBolt,
|
||||||
IconUserCog
|
IconUserCog,
|
||||||
|
IconUsers
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import type { NavigateFunction } from 'react-router-dom';
|
import type { NavigateFunction } from 'react-router-dom';
|
||||||
|
|
||||||
@@ -213,6 +214,16 @@ export function getActions(navigate: NavigateFunction) {
|
|||||||
leftSection: <IconReport size='1.2rem' />
|
leftSection: <IconReport size='1.2rem' />
|
||||||
});
|
});
|
||||||
|
|
||||||
|
staff &&
|
||||||
|
user?.hasViewPermission(ModelType.user) &&
|
||||||
|
_actions.push({
|
||||||
|
id: 'users',
|
||||||
|
label: t`Users`,
|
||||||
|
description: t`Manage user accounts`,
|
||||||
|
onClick: () => navigate('/settings/admin/user'),
|
||||||
|
leftSection: <IconUsers size='1.2rem' />
|
||||||
|
});
|
||||||
|
|
||||||
staff &&
|
staff &&
|
||||||
user?.hasViewPermission(ModelType.pluginconfig) &&
|
user?.hasViewPermission(ModelType.pluginconfig) &&
|
||||||
_actions.push({
|
_actions.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user