@alanszp/access-list 15.0.4 → 16.0.1

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.
@@ -1,24 +1,45 @@
1
1
  import { JWTUser } from "@alanszp/jwt";
2
- export declare enum RoleCode {
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
- protected organizationReference: string;
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
- hasAccessToAll(): boolean;
16
- isAdmin(): boolean;
17
- needsToValidateAccess(): boolean;
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 = exports.RoleCode = void 0;
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,60 @@ 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.isAdmin();
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
- if (this.hasAccessToAll())
44
- return true;
45
- if (!this.segmentReference)
46
- return false;
47
- const hasAccess = yield (0, accessListRepository_1.hasAccessToSomeEmployees)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
48
- return hasAccess;
43
+ if (this.needsToValidateAccess()) {
44
+ return (0, accessListRepository_1.hasAccessToSomeEmployees)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
45
+ }
46
+ return true;
47
+ });
48
+ }
49
+ /**
50
+ * Returns the filtered list of the given employees that this user has access to.
51
+ *
52
+ * @returns A string[] if it has access to some employees. If it has no access it will return an empty array.
53
+ */
54
+ whichEmployeesHasAccess(employeeReference) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ if (this.needsToValidateAccess()) {
57
+ return (0, accessListRepository_1.whichEmployeesHasAccessTo)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
58
+ }
59
+ return employeeReference;
60
+ });
61
+ }
62
+ /**
63
+ * Returns the full access list of employees.
64
+ *
65
+ * @returns true if user has access to all employees. A string[] if it has access to some employees.
66
+ */
67
+ getFullAccessList() {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ if (this.needsToValidateAccess()) {
70
+ return (0, accessListRepository_1.getFullAccessList)(this.segmentReference, this.shouldAddFormerEmployees());
71
+ }
72
+ return true;
49
73
  });
50
74
  }
75
+ /**
76
+ * Returns a boolean if the user has access to that employee.
77
+ */
51
78
  hasAccessTo(employeeReference) {
52
79
  return __awaiter(this, void 0, void 0, function* () {
53
80
  return this.hasAccessToSomeEmployees((0, lodash_1.castArray)(employeeReference));
@@ -57,6 +84,8 @@ class AccessListClient {
57
84
  return this.addFormerEmployees;
58
85
  }
59
86
  /**
87
+ * Like #hasAccessTo but instead of returning a boolean it will throw a NoPermissionError if the user has no access.
88
+ *
60
89
  * @param employeeReference Employee reference to validate access to
61
90
  * @throws {NoPermissionError} if user has no access to employee
62
91
  */
@@ -82,9 +111,6 @@ class AccessListClient {
82
111
  }
83
112
  return this.segmentReference;
84
113
  }
85
- getSegmentReference() {
86
- return this.segmentReference;
87
- }
88
114
  }
89
115
  exports.AccessListClient = AccessListClient;
90
116
  //# sourceMappingURL=AccessListClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccessListClient.js","sourceRoot":"","sources":["../../src/clients/AccessListClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAgE;AAChE,+EAAgF;AAEhF,sDAA4D;AAC5D,mCAAmC;AAEnC,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,yCAA6B,CAAA;IAC7B,6BAAiB,CAAA;AACnB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAED,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;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,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AqB,EAAE,EAAE;gBAChC,OAAO,IAAA,wCAAiB,EACtB,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,wBAAwB,EAAE,CAChC,CAAC;aACH;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;IAED;;OAEG;IACU,WAAW,CAAC,iBAAyB;;YAChD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAA,kBAAS,EAAC,iBAAiB,CAAC,CAAC,CAAC;QACrE,CAAC;KAAA;IAEM,wBAAwB;QAC7B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACU,gBAAgB,CAAC,iBAAyB;;YACrD,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,EAAE;gBAChD,MAAM,IAAI,qCAAiB,EAAE,CAAC;aAC/B;QACH,CAAC;KAAA;IAED;;;OAGG;IACI,yBAAyB;QAC9B,IAAI,CAAC,IAAI,CAAC,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;AAlID,4CAkIC"}
@@ -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,qCAA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AAK,QAAQ,OAAO,QAAQ,kBAAkB,8BAA8B,EAAE,CAAC;AACnF,CAAC;AArBD,8CAqBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanszp/access-list",
3
- "version": "15.0.4",
3
+ "version": "16.0.1",
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/jwt": "^15.0.4",
30
- "@alanszp/validations": "^15.0.0"
29
+ "@alanszp/core": "^16.0.0",
30
+ "@alanszp/jwt": "^16.0.0",
31
+ "@alanszp/validations": "^16.0.0"
31
32
  },
32
- "gitHead": "21554c6285f8c1f6d4aea93d4f9253033d7bf385"
33
+ "gitHead": "08e0fcdda136540968be715c0b998aa020b7ad7f"
33
34
  }