mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-29 19:14:35 +00:00
feat: Add facility to completely hide parts of the interface (#12842)
* fix typing issue for pylance engine * add flags to mark rough function of setting * update pr version * fix settings serialisation * render security warnings * move Transfer Orders * respect return order hiding * almost all confirm texts will have a warning * add settings for sales, purchase and buildorder deactivation * make permission check also ensure gloablsetting for view is available; reduce number of chained gates * document possible missing check * ensure we can still show the sales tab * add additional warning to group cleanup * hide more ui parts conditionally * add tests for new code and remove duplication * fix test * alternative approach to fix SSO path * remove patch; now done in serializer * ignore ldap section
This commit is contained in:
1 parent
1afe583ea5
commit
63a434c652
40 files changed
+339
-157
No files matched your search
@@ -53,3 +53,11 @@ export function userRoleLabel(role: UserRoles): string {
|
||||
return role as string;
|
||||
}
|
||||
}
|
||||
|
||||
export const roleToViewSettingMap: Partial<Record<UserRoles, string>> = {
|
||||
[UserRoles.build]: 'BUILDORDER_ENABLED',
|
||||
[UserRoles.sales_order]: 'SALESORDER_ENABLED',
|
||||
[UserRoles.purchase_order]: 'PURCHASEORDER_ENABLED',
|
||||
[UserRoles.transfer_order]: 'TRANSFERORDER_ENABLED',
|
||||
[UserRoles.return_order]: 'RETURNORDER_ENABLED'
|
||||
};
|
||||
Reference in new issue
Block a user