@floristcloud/api-lib 1.2.136 → 1.2.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,6 +6,8 @@ var UserRoleEnum;
|
|
|
6
6
|
UserRoleEnum["ADMIN"] = "ADMIN";
|
|
7
7
|
UserRoleEnum["MANAGER"] = "MANAGER";
|
|
8
8
|
UserRoleEnum["EMPLOYEE"] = "EMPLOYEE";
|
|
9
|
+
// Warehouse worker: the same panel access as EMPLOYEE, but always sees every client of the company.
|
|
10
|
+
UserRoleEnum["WAREHOUSE_EMPLOYEE"] = "WAREHOUSE_EMPLOYEE";
|
|
9
11
|
UserRoleEnum["BUYER"] = "BUYER";
|
|
10
12
|
})(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
|
|
11
13
|
var UserPanelRoleEnum;
|
|
@@ -13,5 +15,11 @@ var UserPanelRoleEnum;
|
|
|
13
15
|
UserPanelRoleEnum["ADMIN"] = "ADMIN";
|
|
14
16
|
UserPanelRoleEnum["MANAGER"] = "MANAGER";
|
|
15
17
|
UserPanelRoleEnum["EMPLOYEE"] = "EMPLOYEE";
|
|
18
|
+
UserPanelRoleEnum["WAREHOUSE_EMPLOYEE"] = "WAREHOUSE_EMPLOYEE";
|
|
16
19
|
})(UserPanelRoleEnum || (exports.UserPanelRoleEnum = UserPanelRoleEnum = {}));
|
|
17
|
-
exports.USER_PANEL_ROLE_LIST = [
|
|
20
|
+
exports.USER_PANEL_ROLE_LIST = [
|
|
21
|
+
UserRoleEnum.ADMIN,
|
|
22
|
+
UserRoleEnum.MANAGER,
|
|
23
|
+
UserRoleEnum.EMPLOYEE,
|
|
24
|
+
UserRoleEnum.WAREHOUSE_EMPLOYEE,
|
|
25
|
+
];
|
|
@@ -9,7 +9,11 @@ const userRole_enum_1 = require("../../enum/userRole.enum");
|
|
|
9
9
|
* it always bypasses UI restrictions, so any ADMIN entry in a policy is dead
|
|
10
10
|
* config. The admin panel must not offer it, and the sanitizer drops it.
|
|
11
11
|
*/
|
|
12
|
-
exports.CONFIGURABLE_PANEL_ROLE_LIST = [
|
|
12
|
+
exports.CONFIGURABLE_PANEL_ROLE_LIST = [
|
|
13
|
+
userRole_enum_1.UserPanelRoleEnum.MANAGER,
|
|
14
|
+
userRole_enum_1.UserPanelRoleEnum.EMPLOYEE,
|
|
15
|
+
userRole_enum_1.UserPanelRoleEnum.WAREHOUSE_EMPLOYEE,
|
|
16
|
+
];
|
|
13
17
|
/**
|
|
14
18
|
* A sparse map of permission key -> boolean.
|
|
15
19
|
* Semantics are default-allow: a missing key means "allowed", so in practice
|
package/enum/userRole.enum.ts
CHANGED
|
@@ -2,6 +2,8 @@ export enum UserRoleEnum {
|
|
|
2
2
|
ADMIN = 'ADMIN',
|
|
3
3
|
MANAGER = 'MANAGER',
|
|
4
4
|
EMPLOYEE = 'EMPLOYEE',
|
|
5
|
+
// Warehouse worker: the same panel access as EMPLOYEE, but always sees every client of the company.
|
|
6
|
+
WAREHOUSE_EMPLOYEE = 'WAREHOUSE_EMPLOYEE',
|
|
5
7
|
BUYER = 'BUYER',
|
|
6
8
|
}
|
|
7
9
|
|
|
@@ -9,6 +11,12 @@ export enum UserPanelRoleEnum {
|
|
|
9
11
|
ADMIN = 'ADMIN',
|
|
10
12
|
MANAGER = 'MANAGER',
|
|
11
13
|
EMPLOYEE = 'EMPLOYEE',
|
|
14
|
+
WAREHOUSE_EMPLOYEE = 'WAREHOUSE_EMPLOYEE',
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
export const USER_PANEL_ROLE_LIST: UserRoleEnum[] = [
|
|
17
|
+
export const USER_PANEL_ROLE_LIST: UserRoleEnum[] = [
|
|
18
|
+
UserRoleEnum.ADMIN,
|
|
19
|
+
UserRoleEnum.MANAGER,
|
|
20
|
+
UserRoleEnum.EMPLOYEE,
|
|
21
|
+
UserRoleEnum.WAREHOUSE_EMPLOYEE,
|
|
22
|
+
];
|
package/package.json
CHANGED
|
@@ -7,7 +7,11 @@ import { UserPanelRoleEnum } from '../../enum/userRole.enum';
|
|
|
7
7
|
* it always bypasses UI restrictions, so any ADMIN entry in a policy is dead
|
|
8
8
|
* config. The admin panel must not offer it, and the sanitizer drops it.
|
|
9
9
|
*/
|
|
10
|
-
export const CONFIGURABLE_PANEL_ROLE_LIST: UserPanelRoleEnum[] = [
|
|
10
|
+
export const CONFIGURABLE_PANEL_ROLE_LIST: UserPanelRoleEnum[] = [
|
|
11
|
+
UserPanelRoleEnum.MANAGER,
|
|
12
|
+
UserPanelRoleEnum.EMPLOYEE,
|
|
13
|
+
UserPanelRoleEnum.WAREHOUSE_EMPLOYEE,
|
|
14
|
+
];
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* A sparse map of permission key -> boolean.
|