@alanszp/access-list 15.0.3 → 16.0.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/dist/clients/AccessListClient.d.ts +34 -14
- package/dist/clients/AccessListClient.js +48 -21
- package/dist/clients/AccessListClient.js.map +1 -1
- package/dist/repositories/accessListRepository.d.ts +16 -0
- package/dist/repositories/accessListRepository.js +40 -1
- package/dist/repositories/accessListRepository.js.map +1 -1
- package/package.json +5 -4
|
@@ -1,24 +1,45 @@
|
|
|
1
1
|
import { JWTUser } from "@alanszp/jwt";
|
|
2
|
-
|
|
3
|
-
ADMIN = "admin",
|
|
4
|
-
HRBP = "hrbp",
|
|
5
|
-
MANAGER = "manager",
|
|
6
|
-
INTEGRATIONS = "integrations",
|
|
7
|
-
VIEWER = "viewer"
|
|
8
|
-
}
|
|
2
|
+
import { EnsureNull, Ensure } from "@alanszp/core";
|
|
9
3
|
export declare class AccessListClient {
|
|
10
|
-
|
|
4
|
+
organizationReference: string;
|
|
5
|
+
segmentReference: string | null;
|
|
6
|
+
addFormerEmployees: boolean;
|
|
11
7
|
protected roles: string[];
|
|
12
|
-
protected segmentReference: string | null;
|
|
13
|
-
protected addFormerEmployees: boolean;
|
|
14
8
|
constructor({ roles, segmentReference, organizationReference, }: Pick<JWTUser, "roles" | "segmentReference" | "organizationReference">, addFormerEmployees?: boolean);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
/**
|
|
10
|
+
* If the user has no segment, it means that it has access to all employees.
|
|
11
|
+
*/
|
|
12
|
+
hasAccessToAll(): this is EnsureNull<this, "segmentReference">;
|
|
13
|
+
/**
|
|
14
|
+
* If the user has a segment, it needs to validate access.
|
|
15
|
+
*/
|
|
16
|
+
needsToValidateAccess(): this is Ensure<this, "segmentReference">;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a boolean if the user has access any of the given employees.
|
|
19
|
+
*
|
|
20
|
+
* @returns A string[] if it has access to some employees. If it has no access it will return an empty array.
|
|
21
|
+
*/
|
|
18
22
|
hasAccessToSomeEmployees(employeeReference: string[]): Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the filtered list of the given employees that this user has access to.
|
|
25
|
+
*
|
|
26
|
+
* @returns A string[] if it has access to some employees. If it has no access it will return an empty array.
|
|
27
|
+
*/
|
|
28
|
+
whichEmployeesHasAccess(employeeReference: string[]): Promise<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the full access list of employees.
|
|
31
|
+
*
|
|
32
|
+
* @returns true if user has access to all employees. A string[] if it has access to some employees.
|
|
33
|
+
*/
|
|
34
|
+
getFullAccessList(): Promise<string[] | true>;
|
|
35
|
+
/**
|
|
36
|
+
* Returns a boolean if the user has access to that employee.
|
|
37
|
+
*/
|
|
19
38
|
hasAccessTo(employeeReference: string): Promise<boolean>;
|
|
20
39
|
shouldAddFormerEmployees(): boolean;
|
|
21
40
|
/**
|
|
41
|
+
* Like #hasAccessTo but instead of returning a boolean it will throw a NoPermissionError if the user has no access.
|
|
42
|
+
*
|
|
22
43
|
* @param employeeReference Employee reference to validate access to
|
|
23
44
|
* @throws {NoPermissionError} if user has no access to employee
|
|
24
45
|
*/
|
|
@@ -28,5 +49,4 @@ export declare class AccessListClient {
|
|
|
28
49
|
* @returns Segment reference
|
|
29
50
|
*/
|
|
30
51
|
getSegmentReferenceOrFail(): string;
|
|
31
|
-
getSegmentReference(): string | null;
|
|
32
52
|
}
|
|
@@ -9,19 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AccessListClient =
|
|
12
|
+
exports.AccessListClient = void 0;
|
|
13
13
|
const NoPermissionError_1 = require("../errors/NoPermissionError");
|
|
14
14
|
const accessListRepository_1 = require("../repositories/accessListRepository");
|
|
15
15
|
const validations_1 = require("@alanszp/validations");
|
|
16
16
|
const lodash_1 = require("lodash");
|
|
17
|
-
var RoleCode;
|
|
18
|
-
(function (RoleCode) {
|
|
19
|
-
RoleCode["ADMIN"] = "admin";
|
|
20
|
-
RoleCode["HRBP"] = "hrbp";
|
|
21
|
-
RoleCode["MANAGER"] = "manager";
|
|
22
|
-
RoleCode["INTEGRATIONS"] = "integrations";
|
|
23
|
-
RoleCode["VIEWER"] = "viewer";
|
|
24
|
-
})(RoleCode = exports.RoleCode || (exports.RoleCode = {}));
|
|
25
17
|
class AccessListClient {
|
|
26
18
|
constructor({ roles, segmentReference, organizationReference, }, addFormerEmployees) {
|
|
27
19
|
this.organizationReference = organizationReference;
|
|
@@ -29,25 +21,61 @@ class AccessListClient {
|
|
|
29
21
|
this.segmentReference = segmentReference;
|
|
30
22
|
this.addFormerEmployees = addFormerEmployees !== null && addFormerEmployees !== void 0 ? addFormerEmployees : false;
|
|
31
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* If the user has no segment, it means that it has access to all employees.
|
|
26
|
+
*/
|
|
32
27
|
hasAccessToAll() {
|
|
33
|
-
return this.
|
|
34
|
-
}
|
|
35
|
-
isAdmin() {
|
|
36
|
-
return this.roles.includes(RoleCode.ADMIN);
|
|
28
|
+
return this.segmentReference === null;
|
|
37
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* If the user has a segment, it needs to validate access.
|
|
32
|
+
*/
|
|
38
33
|
needsToValidateAccess() {
|
|
39
34
|
return !this.hasAccessToAll();
|
|
40
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns a boolean if the user has access any of the given employees.
|
|
38
|
+
*
|
|
39
|
+
* @returns A string[] if it has access to some employees. If it has no access it will return an empty array.
|
|
40
|
+
*/
|
|
41
41
|
hasAccessToSomeEmployees(employeeReference) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
if (this.hasAccessToAll())
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return hasAccess;
|
|
44
|
+
if (this.needsToValidateAccess()) {
|
|
45
|
+
return (0, accessListRepository_1.hasAccessToSomeEmployees)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
49
48
|
});
|
|
50
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns the filtered list of the given employees that this user has access to.
|
|
52
|
+
*
|
|
53
|
+
* @returns A string[] if it has access to some employees. If it has no access it will return an empty array.
|
|
54
|
+
*/
|
|
55
|
+
whichEmployeesHasAccess(employeeReference) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
if (this.needsToValidateAccess()) {
|
|
58
|
+
return (0, accessListRepository_1.whichEmployeesHasAccessTo)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
|
|
59
|
+
}
|
|
60
|
+
return employeeReference;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the full access list of employees.
|
|
65
|
+
*
|
|
66
|
+
* @returns true if user has access to all employees. A string[] if it has access to some employees.
|
|
67
|
+
*/
|
|
68
|
+
getFullAccessList() {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (this.needsToValidateAccess()) {
|
|
71
|
+
return (0, accessListRepository_1.getFullAccessList)(this.segmentReference, this.shouldAddFormerEmployees());
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns a boolean if the user has access to that employee.
|
|
78
|
+
*/
|
|
51
79
|
hasAccessTo(employeeReference) {
|
|
52
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
81
|
return this.hasAccessToSomeEmployees((0, lodash_1.castArray)(employeeReference));
|
|
@@ -57,6 +85,8 @@ class AccessListClient {
|
|
|
57
85
|
return this.addFormerEmployees;
|
|
58
86
|
}
|
|
59
87
|
/**
|
|
88
|
+
* Like #hasAccessTo but instead of returning a boolean it will throw a NoPermissionError if the user has no access.
|
|
89
|
+
*
|
|
60
90
|
* @param employeeReference Employee reference to validate access to
|
|
61
91
|
* @throws {NoPermissionError} if user has no access to employee
|
|
62
92
|
*/
|
|
@@ -82,9 +112,6 @@ class AccessListClient {
|
|
|
82
112
|
}
|
|
83
113
|
return this.segmentReference;
|
|
84
114
|
}
|
|
85
|
-
getSegmentReference() {
|
|
86
|
-
return this.segmentReference;
|
|
87
|
-
}
|
|
88
115
|
}
|
|
89
116
|
exports.AccessListClient = AccessListClient;
|
|
90
117
|
//# sourceMappingURL=AccessListClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessListClient.js","sourceRoot":"","sources":["../../src/clients/AccessListClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAgE;AAChE,+
|
|
1
|
+
{"version":3,"file":"AccessListClient.js","sourceRoot":"","sources":["../../src/clients/AccessListClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAgE;AAChE,+EAI8C;AAG9C,sDAA4D;AAC5D,mCAAmC;AAEnC,MAAa,gBAAgB;IAS3B,YACE,EACE,KAAK,EACL,gBAAgB,EAChB,qBAAqB,GACiD,EACxE,kBAA4B;QAE5B,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,KAAK,CAAC;IACxD,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,qBAAqB;QAC1B,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACU,wBAAwB,C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AC,gBAAgB,EAAE;YAC1B,MAAM,kCAAoB,CAAC,IAAI,CAAC;gBAC9B,QAAQ,EAAE,kBAAkB;gBAC5B,WAAW,EAAE;oBACX,gBAAgB,EAAE,qCAAqC;iBACxD;aACF,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAnID,4CAmIC"}
|
|
@@ -8,6 +8,22 @@ import { AccessListClient } from "..";
|
|
|
8
8
|
* @returns true if segment reference can access to any of the employees on the list
|
|
9
9
|
*/
|
|
10
10
|
export declare function hasAccessToSomeEmployees(segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Check which employees the segment has access from a given list
|
|
13
|
+
* @param segmentReference the segment which wants to know if it has access to the employee
|
|
14
|
+
* @param employeeReference list of employees
|
|
15
|
+
* @param addFormerEmployees consider left employees
|
|
16
|
+
* @returns true if segment reference can access to any of the employees on the list
|
|
17
|
+
*/
|
|
18
|
+
export declare function whichEmployeesHasAccessTo(segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<string[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the full access list of employees from a segment
|
|
21
|
+
* @param segmentReference the segment which wants to know if it has access to the employee
|
|
22
|
+
* @param employeeReference list of employees
|
|
23
|
+
* @param addFormerEmployees consider left employees
|
|
24
|
+
* @returns true if segment reference can access to any of the employees on the list
|
|
25
|
+
*/
|
|
26
|
+
export declare function getFullAccessList(segmentReference: string, addFormerEmployees: boolean): Promise<string[]>;
|
|
11
27
|
/**
|
|
12
28
|
* Adds accessList filters to a given queryBuilder. Should be called at the end, or at least
|
|
13
29
|
* after the first where is set to the queryBuilder.
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getSQLJoinFilters = exports.addFiltersToSelectQuery = exports.hasAccessToSomeEmployees = void 0;
|
|
12
|
+
exports.getSQLJoinFilters = exports.addFiltersToSelectQuery = exports.getFullAccessList = exports.whichEmployeesHasAccessTo = exports.hasAccessToSomeEmployees = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
/**
|
|
15
15
|
* Check access to list of employees
|
|
@@ -33,6 +33,45 @@ function hasAccessToSomeEmployees(segmentReference, employeeReference, addFormer
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
exports.hasAccessToSomeEmployees = hasAccessToSomeEmployees;
|
|
36
|
+
/**
|
|
37
|
+
* Check which employees the segment has access from a given list
|
|
38
|
+
* @param segmentReference the segment which wants to know if it has access to the employee
|
|
39
|
+
* @param employeeReference list of employees
|
|
40
|
+
* @param addFormerEmployees consider left employees
|
|
41
|
+
* @returns true if segment reference can access to any of the employees on the list
|
|
42
|
+
*/
|
|
43
|
+
function whichEmployeesHasAccessTo(segmentReference, employeeReference, addFormerEmployees) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const query = `SELECT ser.employee_id as employee_id
|
|
46
|
+
FROM segments_employee_relation_with_attrition ser
|
|
47
|
+
WHERE ser.segment_id = $2 AND ser.employee_id::text = ANY($1)
|
|
48
|
+
${addFormerEmployees ? "" : " AND left_organization_at IS NULL"};`;
|
|
49
|
+
const response = (yield (0, typeorm_1.getManager)().query(query, [
|
|
50
|
+
employeeReference,
|
|
51
|
+
segmentReference,
|
|
52
|
+
]));
|
|
53
|
+
return response.map((e) => e.employee_id);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.whichEmployeesHasAccessTo = whichEmployeesHasAccessTo;
|
|
57
|
+
/**
|
|
58
|
+
* Get the full access list of employees from a segment
|
|
59
|
+
* @param segmentReference the segment which wants to know if it has access to the employee
|
|
60
|
+
* @param employeeReference list of employees
|
|
61
|
+
* @param addFormerEmployees consider left employees
|
|
62
|
+
* @returns true if segment reference can access to any of the employees on the list
|
|
63
|
+
*/
|
|
64
|
+
function getFullAccessList(segmentReference, addFormerEmployees) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const query = `SELECT ser.employee_id as employee_id
|
|
67
|
+
FROM segments_employee_relation_with_attrition ser
|
|
68
|
+
WHERE ser.segment_id = $1
|
|
69
|
+
${addFormerEmployees ? "" : " AND left_organization_at IS NULL"};`;
|
|
70
|
+
const response = (yield (0, typeorm_1.getManager)().query(query, [segmentReference]));
|
|
71
|
+
return response.map((e) => e.employee_id);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
exports.getFullAccessList = getFullAccessList;
|
|
36
75
|
/**
|
|
37
76
|
* Adds accessList filters to a given queryBuilder. Should be called at the end, or at least
|
|
38
77
|
* after the first where is set to the queryBuilder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessListRepository.js","sourceRoot":"","sources":["../../src/repositories/accessListRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyD;AAGzD;;;;;;GAMG;AACH,SAAsB,wBAAwB,CAC5C,gBAAwB,EACxB,iBAA2B,EAC3B,kBAA2B;;;QAE3B,MAAM,KAAK,GAAG;;;MAGV,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC,GAAG,CAAC;QAErE,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,oBAAU,GAAE,CAAC,KAAK,CAAC,KAAK,EAAE;YAChD,iBAAiB;YACjB,gBAAgB;SACjB,CAAC,CAA4B,CAAC;QAE/B,OAAO,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,OAAO,mCAAI,KAAK,CAAC;;CACtC;AAhBD,4DAgBC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACrC,YAAmC,EACnC,UAA4B,EAC5B,8BAAsC,EACtC,iBAAiB,GAAG,WAAW,EAC/B,aAAsB,EACtB,gBAAyB;IAEzB,IAAI,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,gBAAgB;QAAE,OAAO,YAAY,CAAC;IAE1E,IAAI,qBAAqB,GAAG,gBAAgB,CAAC;IAC7C,IAAI,CAAC,qBAAqB,EAAE;QAC1B,qBAAqB,GAAG,UAAU,CAAC,yBAAyB,EAAE,CAAC;KAChE;IAED,MAAM,QAAQ,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,KAAK,CAAC;IAExC,MAAM,KAAK,GAAG;;0BAEU,iBAAiB;MAErC,UAAU,CAAC,wBAAwB,EAAE;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kCACN,GAAG,CAAC;IAEN,OAAO,YAAY,CAAC,SAAS,CAC3B,KAAK,EACL,QAAQ,EACR,GAAG,QAAQ,wBAAwB,8BAA8B,EAAE,EACnE;QACE,CAAC,iBAAiB,CAAC,EAAE,qBAAqB;KAC3C,CACF,CAAC;AACJ,CAAC;AAlCD,0DAkCC;AAED,SAAgB,iBAAiB,CAC/B,UAA4B,EAC5B,8BAAsC,EACtC,qBAA6B,EAC7B,aAAsB;IAEtB,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACxC,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;KACH;IACD,MAAM,QAAQ,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,KAAK,CAAC;IAExC,OAAO;;yBAEgB,qBAAqB;MAExC,UAAU,CAAC,wBAAwB,EAAE;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kCACN,KAAK,QAAQ,OAAO,QAAQ,kBAAkB,8BAA8B,EAAE,CAAC;AACnF,CAAC;AArBD,8CAqBC"}
|
|
1
|
+
{"version":3,"file":"accessListRepository.js","sourceRoot":"","sources":["../../src/repositories/accessListRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyD;AAGzD;;;;;;GAMG;AACH,SAAsB,wBAAwB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EAAE,CAAC;AACnF,CAAC;AArBD,8CAqBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanszp/access-list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Alan's validation utils.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
"class-validator": "^0.14.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@alanszp/
|
|
30
|
-
"@alanszp/
|
|
29
|
+
"@alanszp/core": "^16.0.0",
|
|
30
|
+
"@alanszp/jwt": "^16.0.0",
|
|
31
|
+
"@alanszp/validations": "^16.0.0"
|
|
31
32
|
},
|
|
32
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "919bf4ac232e8b6fc8d6c3203bba5852ae3e1ac9"
|
|
33
34
|
}
|