@edular/permissions 12.8.0 → 12.9.0
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.
- package/README.md +0 -0
- package/lib/constants.d.ts +7 -7
- package/lib/helpers.js +1 -1
- package/lib/index.js +5 -1
- package/lib/permissions.d.ts +0 -3
- package/lib/permissions.js +12 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
File without changes
|
package/lib/constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare enum UserProfileType {
|
|
|
5
5
|
Student = "student",
|
|
6
6
|
Others = "others"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type PermissionDetails = {
|
|
9
9
|
permissionId: number;
|
|
10
10
|
name: string;
|
|
11
11
|
departmentId?: number;
|
|
@@ -45,27 +45,27 @@ export declare const SubunitPermissionTargetTypes: {
|
|
|
45
45
|
"tasks.reopen_completed": PermissionType[];
|
|
46
46
|
director: PermissionType[];
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type StaffProfilePermissionsDetails = {
|
|
49
49
|
type: UserProfileType.Staff;
|
|
50
50
|
enabledPermissionIds: number[];
|
|
51
51
|
enabledDepartmentPermissionIds: number[];
|
|
52
52
|
isUserAccessDisabled: boolean;
|
|
53
53
|
isPersonalContactsAccessDisabled: boolean;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type StudentProfilePermissionsDetails = {
|
|
56
56
|
type: UserProfileType.Student;
|
|
57
57
|
enabledPermissionIds: number[];
|
|
58
58
|
isUserAccessDisabled: boolean;
|
|
59
59
|
isPersonalContactsAccessDisabled: boolean;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type AdminProfilePermissionsDetails = {
|
|
62
62
|
type: UserProfileType.Admin;
|
|
63
63
|
};
|
|
64
|
-
export
|
|
64
|
+
export type ApiKeyProfilePermissionsDetails = {
|
|
65
65
|
type: UserProfileType.ApiKey;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type OthersProfilePermissionsDetails = {
|
|
68
68
|
type: UserProfileType.Others;
|
|
69
69
|
enabledPermissionIds: number[];
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type ProfilePermissionsDetails = StaffProfilePermissionsDetails | StudentProfilePermissionsDetails | AdminProfilePermissionsDetails | ApiKeyProfilePermissionsDetails | OthersProfilePermissionsDetails;
|
package/lib/helpers.js
CHANGED
|
@@ -18,7 +18,7 @@ var checkIfProfileHasNeededPermissions = function (profilePermissions, permissio
|
|
|
18
18
|
exports.checkIfProfileHasNeededPermissions = checkIfProfileHasNeededPermissions;
|
|
19
19
|
var getEnabledPermissionsForTarget = function (permissions, target, type) {
|
|
20
20
|
return permissions.filter(function (permission) {
|
|
21
|
-
return permission.name.endsWith(target
|
|
21
|
+
return permission.name.endsWith("".concat(target, ".").concat(type));
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
exports.getEnabledPermissionsForTarget = getEnabledPermissionsForTarget;
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/permissions.d.ts
CHANGED
package/lib/permissions.js
CHANGED
|
@@ -898,9 +898,6 @@ exports.Permissions = {
|
|
|
898
898
|
},
|
|
899
899
|
PinnedItems: {
|
|
900
900
|
Edit: 6142
|
|
901
|
-
},
|
|
902
|
-
SequenceOfItems: {
|
|
903
|
-
Edit: 6185
|
|
904
901
|
}
|
|
905
902
|
},
|
|
906
903
|
Resources: {
|
|
@@ -1034,22 +1031,22 @@ exports.Permissions = {
|
|
|
1034
1031
|
},
|
|
1035
1032
|
Students: {
|
|
1036
1033
|
FinAid: {
|
|
1037
|
-
View: 6173,
|
|
1038
|
-
Add: 6174,
|
|
1039
|
-
Edit: 6175,
|
|
1040
|
-
Delete: 6176
|
|
1041
|
-
},
|
|
1042
|
-
PaymentPlan: {
|
|
1043
|
-
View: 6177,
|
|
1044
|
-
Add: 6178,
|
|
1045
|
-
Edit: 6179,
|
|
1046
|
-
Delete: 6180
|
|
1047
|
-
},
|
|
1048
|
-
StudentLedger: {
|
|
1049
1034
|
View: 6181,
|
|
1050
1035
|
Add: 6182,
|
|
1051
1036
|
Edit: 6183,
|
|
1052
1037
|
Delete: 6184
|
|
1038
|
+
},
|
|
1039
|
+
PaymentPlan: {
|
|
1040
|
+
View: 6185,
|
|
1041
|
+
Add: 6186,
|
|
1042
|
+
Edit: 6187,
|
|
1043
|
+
Delete: 6188
|
|
1044
|
+
},
|
|
1045
|
+
StudentLedger: {
|
|
1046
|
+
View: 6189,
|
|
1047
|
+
Add: 6190,
|
|
1048
|
+
Edit: 6191,
|
|
1049
|
+
Delete: 6192
|
|
1053
1050
|
}
|
|
1054
1051
|
}
|
|
1055
1052
|
},
|