@ackplus/nest-auth 0.0.28 → 0.0.29
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/package.json +1 -1
- package/src/lib/core/entities.d.ts +1 -5
- package/src/lib/core/entities.js +0 -6
- package/src/lib/core/entities.js.map +1 -1
- package/src/lib/role/entities/permission.entity.d.ts +4 -3
- package/src/lib/role/entities/permission.entity.js +4 -4
- package/src/lib/role/entities/permission.entity.js.map +1 -1
- package/src/lib/role/entities/role.entity.d.ts +4 -4
- package/src/lib/role/entities/role.entity.js +20 -17
- package/src/lib/role/entities/role.entity.js.map +1 -1
- package/src/lib/role/role.module.js +1 -3
- package/src/lib/role/role.module.js.map +1 -1
- package/src/lib/user/entities/user.entity.d.ts +2 -2
- package/src/lib/user/entities/user.entity.js +7 -7
- package/src/lib/user/entities/user.entity.js.map +1 -1
- package/src/lib/role/entities/role-permission.entity.d.ts +0 -9
- package/src/lib/role/entities/role-permission.entity.js +0 -30
- package/src/lib/role/entities/role-permission.entity.js.map +0 -1
- package/src/lib/role/entities/user-role.entity.d.ts +0 -13
- package/src/lib/role/entities/user-role.entity.js +0 -47
- package/src/lib/role/entities/user-role.entity.js.map +0 -1
package/package.json
CHANGED
|
@@ -4,8 +4,6 @@ import { AccessKey } from '../user/entities/access-key.entity';
|
|
|
4
4
|
import { Tenant } from '../tenant/entities/tenant.entity';
|
|
5
5
|
import { Role } from '../role/entities/role.entity';
|
|
6
6
|
import { Permission } from '../role/entities/permission.entity';
|
|
7
|
-
import { RolePermission } from '../role/entities/role-permission.entity';
|
|
8
|
-
import { UserRole } from '../role/entities/user-role.entity';
|
|
9
7
|
import { MFASecret } from '../auth/entities/mfa-secret.entity';
|
|
10
8
|
import { OTP } from '../auth/entities/otp.entity';
|
|
11
9
|
import { Session } from '../session/entities/session.entity';
|
|
@@ -15,9 +13,7 @@ export * from '../user/entities/access-key.entity';
|
|
|
15
13
|
export * from '../tenant/entities/tenant.entity';
|
|
16
14
|
export * from '../role/entities/role.entity';
|
|
17
15
|
export * from '../role/entities/permission.entity';
|
|
18
|
-
export * from '../role/entities/role-permission.entity';
|
|
19
|
-
export * from '../role/entities/user-role.entity';
|
|
20
16
|
export * from '../auth/entities/mfa-secret.entity';
|
|
21
17
|
export * from '../auth/entities/otp.entity';
|
|
22
18
|
export * from '../session/entities/session.entity';
|
|
23
|
-
export declare const NestAuthEntities: (typeof Tenant | typeof AuthIdentity | typeof User | typeof Session | typeof
|
|
19
|
+
export declare const NestAuthEntities: (typeof Tenant | typeof AuthIdentity | typeof User | typeof Session | typeof OTP | typeof MFASecret | typeof Permission | typeof Role | typeof AccessKey)[];
|
package/src/lib/core/entities.js
CHANGED
|
@@ -8,8 +8,6 @@ const access_key_entity_1 = require("../user/entities/access-key.entity");
|
|
|
8
8
|
const tenant_entity_1 = require("../tenant/entities/tenant.entity");
|
|
9
9
|
const role_entity_1 = require("../role/entities/role.entity");
|
|
10
10
|
const permission_entity_1 = require("../role/entities/permission.entity");
|
|
11
|
-
const role_permission_entity_1 = require("../role/entities/role-permission.entity");
|
|
12
|
-
const user_role_entity_1 = require("../role/entities/user-role.entity");
|
|
13
11
|
const mfa_secret_entity_1 = require("../auth/entities/mfa-secret.entity");
|
|
14
12
|
const otp_entity_1 = require("../auth/entities/otp.entity");
|
|
15
13
|
const session_entity_1 = require("../session/entities/session.entity");
|
|
@@ -19,8 +17,6 @@ tslib_1.__exportStar(require("../user/entities/access-key.entity"), exports);
|
|
|
19
17
|
tslib_1.__exportStar(require("../tenant/entities/tenant.entity"), exports);
|
|
20
18
|
tslib_1.__exportStar(require("../role/entities/role.entity"), exports);
|
|
21
19
|
tslib_1.__exportStar(require("../role/entities/permission.entity"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("../role/entities/role-permission.entity"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("../role/entities/user-role.entity"), exports);
|
|
24
20
|
tslib_1.__exportStar(require("../auth/entities/mfa-secret.entity"), exports);
|
|
25
21
|
tslib_1.__exportStar(require("../auth/entities/otp.entity"), exports);
|
|
26
22
|
tslib_1.__exportStar(require("../session/entities/session.entity"), exports);
|
|
@@ -29,8 +25,6 @@ exports.NestAuthEntities = [
|
|
|
29
25
|
auth_identity_entity_1.AuthIdentity,
|
|
30
26
|
role_entity_1.Role,
|
|
31
27
|
permission_entity_1.Permission,
|
|
32
|
-
role_permission_entity_1.RolePermission,
|
|
33
|
-
user_role_entity_1.UserRole,
|
|
34
28
|
tenant_entity_1.Tenant,
|
|
35
29
|
mfa_secret_entity_1.MFASecret,
|
|
36
30
|
session_entity_1.Session,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../../../packages/nest-auth/src/lib/core/entities.ts"],"names":[],"mappings":";;;;AAAA,8DAAoD;AACpD,gFAAqE;AACrE,0EAA+D;AAC/D,oEAA0D;AAC1D,8DAAoD;AACpD,0EAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../../../../packages/nest-auth/src/lib/core/entities.ts"],"names":[],"mappings":";;;;AAAA,8DAAoD;AACpD,gFAAqE;AACrE,0EAA+D;AAC/D,oEAA0D;AAC1D,8DAAoD;AACpD,0EAAgE;AAChE,0EAA+D;AAC/D,4DAAkD;AAClD,uEAA6D;AAE7D,uEAA6C;AAC7C,gFAAsD;AACtD,6EAAmD;AACnD,2EAAiD;AACjD,uEAA6C;AAC7C,6EAAmD;AACnD,6EAAmD;AACnD,sEAA4C;AAC5C,6EAAmD;AAEtC,QAAA,gBAAgB,GAAG;IAC5B,kBAAI;IACJ,mCAAY;IACZ,kBAAI;IACJ,8BAAU;IACV,sBAAM;IACN,6BAAS;IACT,wBAAO;IACP,gBAAG;IACH,6BAAS;CACZ,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BaseEntity } from "typeorm";
|
|
2
|
+
import { Role } from "./role.entity";
|
|
3
|
+
export declare class Permission extends BaseEntity {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
guard: string;
|
|
7
8
|
createdAt: Date;
|
|
8
9
|
updatedAt: Date;
|
|
9
|
-
|
|
10
|
+
roles: Role[];
|
|
10
11
|
}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Permission = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
|
-
const
|
|
6
|
+
const role_entity_1 = require("./role.entity");
|
|
7
7
|
const auth_constants_1 = require("../../auth.constants");
|
|
8
|
-
let Permission = class Permission {
|
|
8
|
+
let Permission = class Permission extends typeorm_1.BaseEntity {
|
|
9
9
|
};
|
|
10
10
|
exports.Permission = Permission;
|
|
11
11
|
tslib_1.__decorate([
|
|
@@ -33,9 +33,9 @@ tslib_1.__decorate([
|
|
|
33
33
|
tslib_1.__metadata("design:type", Date)
|
|
34
34
|
], Permission.prototype, "updatedAt", void 0);
|
|
35
35
|
tslib_1.__decorate([
|
|
36
|
-
(0, typeorm_1.
|
|
36
|
+
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, role => role.permissions),
|
|
37
37
|
tslib_1.__metadata("design:type", Array)
|
|
38
|
-
], Permission.prototype, "
|
|
38
|
+
], Permission.prototype, "roles", void 0);
|
|
39
39
|
exports.Permission = Permission = tslib_1.__decorate([
|
|
40
40
|
(0, typeorm_1.Entity)('nest_auth_permissions')
|
|
41
41
|
], Permission);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/permission.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/permission.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA6H;AAC7H,+CAAqC;AACrC,yDAA0D;AAGnD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,oBAAU;CAqBzC,CAAA;AArBY,gCAAU;AAEnB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sCACpB;AAGX;IADC,IAAA,gBAAM,GAAE;;wCACI;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,mCAAkB,EAAE,CAAC;;yCAC1C;AAGd;IADC,IAAA,0BAAgB,GAAE;sCACR,IAAI;6CAAC;AAGhB;IADC,IAAA,0BAAgB,GAAE;sCACR,IAAI;6CAAC;AAGhB;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;yCACnC;qBApBL,UAAU;IADtB,IAAA,gBAAM,EAAC,uBAAuB,CAAC;GACnB,UAAU,CAqBtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from "typeorm";
|
|
2
|
-
import { UserRole } from "./user-role.entity";
|
|
3
|
-
import { RolePermission } from "./role-permission.entity";
|
|
4
2
|
import { Tenant } from "../../tenant/entities/tenant.entity";
|
|
3
|
+
import { User } from "../../user/entities/user.entity";
|
|
4
|
+
import { Permission } from "./permission.entity";
|
|
5
5
|
export declare class Role extends BaseEntity {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
@@ -12,8 +12,8 @@ export declare class Role extends BaseEntity {
|
|
|
12
12
|
isActive: boolean;
|
|
13
13
|
createdAt: Date;
|
|
14
14
|
updatedAt: Date;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
permissions: Permission[];
|
|
16
|
+
users: User[];
|
|
17
17
|
static createRole(name: string, guard: string, isSystem: boolean, tenantId: string): Promise<Role>;
|
|
18
18
|
syncPermissions(permissionIds: string | string[]): Promise<void>;
|
|
19
19
|
removePermissions(permissionIds: string | string[]): Promise<void>;
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Role = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const typeorm_1 = require("typeorm");
|
|
7
|
-
const user_role_entity_1 = require("./user-role.entity");
|
|
8
|
-
const role_permission_entity_1 = require("./role-permission.entity");
|
|
9
7
|
const lodash_1 = require("lodash");
|
|
10
8
|
const auth_constants_1 = require("../../auth.constants");
|
|
11
9
|
const tenant_entity_1 = require("../../tenant/entities/tenant.entity");
|
|
12
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
+
const user_entity_1 = require("../../user/entities/user.entity");
|
|
12
|
+
const permission_entity_1 = require("./permission.entity");
|
|
13
13
|
let Role = Role_1 = class Role extends typeorm_1.BaseEntity {
|
|
14
14
|
static async createRole(name, guard = auth_constants_1.DEFAULT_GUARD_NAME, isSystem = false, tenantId) {
|
|
15
15
|
const existingSystemRole = await Role_1.findOne({
|
|
@@ -28,26 +28,23 @@ let Role = Role_1 = class Role extends typeorm_1.BaseEntity {
|
|
|
28
28
|
}
|
|
29
29
|
async syncPermissions(permissionIds) {
|
|
30
30
|
const newPermissions = Array.isArray(permissionIds) ? permissionIds : [permissionIds];
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
permissionId
|
|
31
|
+
this.permissions = newPermissions.map(permissionId => permission_entity_1.Permission.create({
|
|
32
|
+
id: permissionId,
|
|
34
33
|
}));
|
|
35
34
|
}
|
|
36
35
|
async removePermissions(permissionIds) {
|
|
37
36
|
const removingPermissions = Array.isArray(permissionIds) ? permissionIds : [permissionIds];
|
|
38
|
-
this.
|
|
37
|
+
this.permissions = this.permissions.filter(permission => !removingPermissions.includes(permission.id));
|
|
39
38
|
}
|
|
40
39
|
async attachPermissions(permissionsIds) {
|
|
41
|
-
const existingPermissions = await this.
|
|
42
|
-
|
|
43
|
-
permissionId: rolePermission.permissionId
|
|
40
|
+
const existingPermissions = await this.permissions.map(permission => permission_entity_1.Permission.create({
|
|
41
|
+
id: permission.id,
|
|
44
42
|
}));
|
|
45
43
|
const newPermissions = Array.isArray(permissionsIds) ? permissionsIds : [permissionsIds];
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
permissionId
|
|
44
|
+
const newPermissionsEntities = newPermissions.map(permissionId => permission_entity_1.Permission.create({
|
|
45
|
+
id: permissionId,
|
|
49
46
|
}));
|
|
50
|
-
this.
|
|
47
|
+
this.permissions = (0, lodash_1.uniqBy)([...existingPermissions, ...newPermissionsEntities], 'id');
|
|
51
48
|
}
|
|
52
49
|
};
|
|
53
50
|
exports.Role = Role;
|
|
@@ -89,13 +86,19 @@ tslib_1.__decorate([
|
|
|
89
86
|
tslib_1.__metadata("design:type", Date)
|
|
90
87
|
], Role.prototype, "updatedAt", void 0);
|
|
91
88
|
tslib_1.__decorate([
|
|
92
|
-
(0, typeorm_1.
|
|
89
|
+
(0, typeorm_1.ManyToMany)(() => permission_entity_1.Permission, permission => permission.roles),
|
|
90
|
+
(0, typeorm_1.JoinTable)({
|
|
91
|
+
name: 'nest_auth_role_nest_auth_permissions'
|
|
92
|
+
}),
|
|
93
93
|
tslib_1.__metadata("design:type", Array)
|
|
94
|
-
], Role.prototype, "
|
|
94
|
+
], Role.prototype, "permissions", void 0);
|
|
95
95
|
tslib_1.__decorate([
|
|
96
|
-
(0, typeorm_1.
|
|
96
|
+
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, user => user.roles),
|
|
97
|
+
(0, typeorm_1.JoinTable)({
|
|
98
|
+
name: 'nest_auth_role_nest_auth_users'
|
|
99
|
+
}),
|
|
97
100
|
tslib_1.__metadata("design:type", Array)
|
|
98
|
-
], Role.prototype, "
|
|
101
|
+
], Role.prototype, "users", void 0);
|
|
99
102
|
exports.Role = Role = Role_1 = tslib_1.__decorate([
|
|
100
103
|
(0, typeorm_1.Entity)('nest_auth_roles'),
|
|
101
104
|
(0, typeorm_1.Unique)(['name', 'guard', 'tenantId'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/role.entity.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/role.entity.ts"],"names":[],"mappings":";;;;;AAAA,qCAAkL;AAClL,mCAAgC;AAChC,yDAA0D;AAC1D,uEAA6D;AAC7D,2CAAmD;AACnD,iEAAuD;AACvD,2DAAiD;AAI1C,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,oBAAU;IAyChC,MAAM,CAAC,KAAK,CAAC,UAAU,CACnB,IAAY,EACZ,QAAgB,mCAAkB,EAClC,WAAoB,KAAK,EACzB,QAAgB;QAIhB,MAAM,kBAAkB,GAAG,MAAM,MAAI,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;SAClC,CAAC,CAAC;QACH,IAAI,kBAAkB,EAAE,CAAC;YACrB,MAAM,IAAI,0BAAiB,CAAC,iCAAiC,IAAI,sCAAsC,CAAC,CAAC;QAC7G,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,MAAI,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,aAAgC;QAClD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAA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@nestjs/typeorm");
|
|
|
7
7
|
const role_entity_1 = require("./entities/role.entity");
|
|
8
8
|
const permission_entity_1 = require("./entities/permission.entity");
|
|
9
9
|
const role_service_1 = require("./services/role.service");
|
|
10
|
-
const user_role_entity_1 = require("./entities/user-role.entity");
|
|
11
|
-
const role_permission_entity_1 = require("./entities/role-permission.entity");
|
|
12
10
|
let RoleModule = class RoleModule {
|
|
13
11
|
};
|
|
14
12
|
exports.RoleModule = RoleModule;
|
|
15
13
|
exports.RoleModule = RoleModule = tslib_1.__decorate([
|
|
16
14
|
(0, common_1.Module)({
|
|
17
15
|
imports: [
|
|
18
|
-
typeorm_1.TypeOrmModule.forFeature([role_entity_1.Role, permission_entity_1.Permission
|
|
16
|
+
typeorm_1.TypeOrmModule.forFeature([role_entity_1.Role, permission_entity_1.Permission]),
|
|
19
17
|
],
|
|
20
18
|
providers: [role_service_1.RoleService],
|
|
21
19
|
exports: [role_service_1.RoleService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.module.js","sourceRoot":"","sources":["../../../../../../packages/nest-auth/src/lib/role/role.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,wDAA8C;AAC9C,oEAA0D;AAC1D,0DAAsD;
|
|
1
|
+
{"version":3,"file":"role.module.js","sourceRoot":"","sources":["../../../../../../packages/nest-auth/src/lib/role/role.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,wDAA8C;AAC9C,oEAA0D;AAC1D,0DAAsD;AAS/C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAI,CAAA;AAAd,gCAAU;qBAAV,UAAU;IAPtB,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,EAAE,8BAAU,CAAC,CAAC;SAC/C;QACD,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACzB,CAAC;GACW,UAAU,CAAI"}
|
|
@@ -2,9 +2,9 @@ import { BaseEntity } from "typeorm";
|
|
|
2
2
|
import { Tenant } from "../../tenant";
|
|
3
3
|
import { AuthIdentity } from "./auth-identity.entity";
|
|
4
4
|
import { Session } from "../../session/entities/session.entity";
|
|
5
|
-
import { UserRole } from "../../role/entities/user-role.entity";
|
|
6
5
|
import { OTP } from "../../auth/entities/otp.entity";
|
|
7
6
|
import { MFASecret } from "../../auth/entities/mfa-secret.entity";
|
|
7
|
+
import { Role } from "../../role/entities/role.entity";
|
|
8
8
|
export declare class User extends BaseEntity {
|
|
9
9
|
id: string;
|
|
10
10
|
email: string;
|
|
@@ -25,7 +25,7 @@ export declare class User extends BaseEntity {
|
|
|
25
25
|
mfaSecrets: MFASecret[];
|
|
26
26
|
sessions: Session[];
|
|
27
27
|
otps: OTP[];
|
|
28
|
-
|
|
28
|
+
roles: Role[];
|
|
29
29
|
emailTenant: string;
|
|
30
30
|
phoneTenant: string;
|
|
31
31
|
updateTenantFields(): void;
|
|
@@ -7,25 +7,25 @@ const bcrypt_1 = tslib_1.__importDefault(require("bcrypt"));
|
|
|
7
7
|
const tenant_1 = require("../../tenant");
|
|
8
8
|
const auth_identity_entity_1 = require("./auth-identity.entity");
|
|
9
9
|
const session_entity_1 = require("../../session/entities/session.entity");
|
|
10
|
-
const user_role_entity_1 = require("../../role/entities/user-role.entity");
|
|
11
10
|
const lodash_1 = require("lodash");
|
|
12
11
|
const otp_entity_1 = require("../../auth/entities/otp.entity");
|
|
13
12
|
const mfa_secret_entity_1 = require("../../auth/entities/mfa-secret.entity");
|
|
13
|
+
const role_entity_1 = require("../../role/entities/role.entity");
|
|
14
14
|
let User = class User extends typeorm_1.BaseEntity {
|
|
15
15
|
updateTenantFields() {
|
|
16
16
|
this.emailTenant = this.email ? `${this.email}:${this.tenantId || 'global'}` : null;
|
|
17
17
|
this.phoneTenant = this.phone ? `${this.phone}:${this.tenantId || 'global'}` : null;
|
|
18
18
|
}
|
|
19
19
|
getPermissions() {
|
|
20
|
-
return (0, lodash_1.chain)(this.
|
|
21
|
-
.map(role => (0, lodash_1.map)(role.
|
|
20
|
+
return (0, lodash_1.chain)(this.roles)
|
|
21
|
+
.map(role => (0, lodash_1.map)(role.permissions, 'name'))
|
|
22
22
|
.flatten()
|
|
23
23
|
.uniq()
|
|
24
24
|
.value();
|
|
25
25
|
}
|
|
26
26
|
getRoles() {
|
|
27
|
-
return (0, lodash_1.chain)(this.
|
|
28
|
-
.map(role => role.
|
|
27
|
+
return (0, lodash_1.chain)(this.roles)
|
|
28
|
+
.map(role => role.name)
|
|
29
29
|
.uniq()
|
|
30
30
|
.value();
|
|
31
31
|
}
|
|
@@ -121,9 +121,9 @@ tslib_1.__decorate([
|
|
|
121
121
|
tslib_1.__metadata("design:type", Array)
|
|
122
122
|
], User.prototype, "otps", void 0);
|
|
123
123
|
tslib_1.__decorate([
|
|
124
|
-
(0, typeorm_1.
|
|
124
|
+
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, role => role.users),
|
|
125
125
|
tslib_1.__metadata("design:type", Array)
|
|
126
|
-
], User.prototype, "
|
|
126
|
+
], User.prototype, "roles", void 0);
|
|
127
127
|
tslib_1.__decorate([
|
|
128
128
|
(0, typeorm_1.Index)('IDX_USER_EMAIL_TENANT', { unique: true }),
|
|
129
129
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/user/entities/user.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/user/entities/user.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAciB;AACjB,4DAA4B;AAC5B,yCAAsC;AACtC,iEAAsD;AACtD,0EAAgE;AAChE,mCAAoC;AACpC,+DAAqD;AACrD,6EAAkE;AAClE,iEAAuD;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B,GAAE;sCACR,IAAI;uCAAC;AAGhB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;;wCAC9B;AAG3B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;;wCAChC;AAGxB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;;sCAC9B;AAGpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;;kCAC1B;AAGZ;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;;mCAC7B;AAId;IAFC,IAAA,eAAK,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChD,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACP;AAIpB;IAFC,IAAA,eAAK,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChD,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACP;AAIpB;IAFC,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;8CAId;eA9EQ,IAAI;IADhB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,IAAI,CAwGhB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from "typeorm";
|
|
2
|
-
import { Role } from "./role.entity";
|
|
3
|
-
import { Permission } from "./permission.entity";
|
|
4
|
-
export declare class RolePermission extends BaseEntity {
|
|
5
|
-
roleId: string;
|
|
6
|
-
permissionId: string;
|
|
7
|
-
role: Role;
|
|
8
|
-
permission: Permission;
|
|
9
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RolePermission = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const typeorm_1 = require("typeorm");
|
|
6
|
-
const role_entity_1 = require("./role.entity");
|
|
7
|
-
const permission_entity_1 = require("./permission.entity");
|
|
8
|
-
let RolePermission = class RolePermission extends typeorm_1.BaseEntity {
|
|
9
|
-
};
|
|
10
|
-
exports.RolePermission = RolePermission;
|
|
11
|
-
tslib_1.__decorate([
|
|
12
|
-
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
13
|
-
tslib_1.__metadata("design:type", String)
|
|
14
|
-
], RolePermission.prototype, "roleId", void 0);
|
|
15
|
-
tslib_1.__decorate([
|
|
16
|
-
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
17
|
-
tslib_1.__metadata("design:type", String)
|
|
18
|
-
], RolePermission.prototype, "permissionId", void 0);
|
|
19
|
-
tslib_1.__decorate([
|
|
20
|
-
(0, typeorm_1.ManyToOne)(() => role_entity_1.Role, role => role.rolePermissions, { onDelete: 'CASCADE' }),
|
|
21
|
-
tslib_1.__metadata("design:type", role_entity_1.Role)
|
|
22
|
-
], RolePermission.prototype, "role", void 0);
|
|
23
|
-
tslib_1.__decorate([
|
|
24
|
-
(0, typeorm_1.ManyToOne)(() => permission_entity_1.Permission, permission => permission.rolePermissions, { onDelete: 'CASCADE' }),
|
|
25
|
-
tslib_1.__metadata("design:type", permission_entity_1.Permission)
|
|
26
|
-
], RolePermission.prototype, "permission", void 0);
|
|
27
|
-
exports.RolePermission = RolePermission = tslib_1.__decorate([
|
|
28
|
-
(0, typeorm_1.Entity)('nest_auth_role_permissions')
|
|
29
|
-
], RolePermission);
|
|
30
|
-
//# sourceMappingURL=role-permission.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role-permission.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/role-permission.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAuE;AACvE,+CAAqC;AACrC,2DAAiD;AAG1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,oBAAU;CAY7C,CAAA;AAZY,wCAAc;AAEvB;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;8CACP;AAGf;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;oDACD;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;sCACvE,kBAAI;4CAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;sCACnF,8BAAU;kDAAC;yBAXd,cAAc;IAD1B,IAAA,gBAAM,EAAC,4BAA4B,CAAC;GACxB,cAAc,CAY1B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { User } from "../../user/entities/user.entity";
|
|
2
|
-
import { Role } from "./role.entity";
|
|
3
|
-
import { Tenant } from "../../tenant/entities/tenant.entity";
|
|
4
|
-
export declare class UserRole {
|
|
5
|
-
userId: string;
|
|
6
|
-
roleId: string;
|
|
7
|
-
tenantId: string;
|
|
8
|
-
user: User;
|
|
9
|
-
role: Role;
|
|
10
|
-
tenant: Tenant;
|
|
11
|
-
createdAt: Date;
|
|
12
|
-
updatedAt: Date;
|
|
13
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserRole = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const typeorm_1 = require("typeorm");
|
|
6
|
-
const user_entity_1 = require("../../user/entities/user.entity");
|
|
7
|
-
const role_entity_1 = require("./role.entity");
|
|
8
|
-
const tenant_entity_1 = require("../../tenant/entities/tenant.entity");
|
|
9
|
-
let UserRole = class UserRole {
|
|
10
|
-
};
|
|
11
|
-
exports.UserRole = UserRole;
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
14
|
-
tslib_1.__metadata("design:type", String)
|
|
15
|
-
], UserRole.prototype, "userId", void 0);
|
|
16
|
-
tslib_1.__decorate([
|
|
17
|
-
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
18
|
-
tslib_1.__metadata("design:type", String)
|
|
19
|
-
], UserRole.prototype, "roleId", void 0);
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
22
|
-
tslib_1.__metadata("design:type", String)
|
|
23
|
-
], UserRole.prototype, "tenantId", void 0);
|
|
24
|
-
tslib_1.__decorate([
|
|
25
|
-
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.userRoles, { onDelete: 'CASCADE' }),
|
|
26
|
-
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
27
|
-
], UserRole.prototype, "user", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, typeorm_1.ManyToOne)(() => role_entity_1.Role, role => role.userRoles, { onDelete: 'CASCADE' }),
|
|
30
|
-
tslib_1.__metadata("design:type", role_entity_1.Role)
|
|
31
|
-
], UserRole.prototype, "role", void 0);
|
|
32
|
-
tslib_1.__decorate([
|
|
33
|
-
(0, typeorm_1.ManyToOne)(() => tenant_entity_1.Tenant),
|
|
34
|
-
tslib_1.__metadata("design:type", tenant_entity_1.Tenant)
|
|
35
|
-
], UserRole.prototype, "tenant", void 0);
|
|
36
|
-
tslib_1.__decorate([
|
|
37
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
38
|
-
tslib_1.__metadata("design:type", Date)
|
|
39
|
-
], UserRole.prototype, "createdAt", void 0);
|
|
40
|
-
tslib_1.__decorate([
|
|
41
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
42
|
-
tslib_1.__metadata("design:type", Date)
|
|
43
|
-
], UserRole.prototype, "updatedAt", void 0);
|
|
44
|
-
exports.UserRole = UserRole = tslib_1.__decorate([
|
|
45
|
-
(0, typeorm_1.Entity)('nest_auth_user_roles')
|
|
46
|
-
], UserRole);
|
|
47
|
-
//# sourceMappingURL=user-role.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-role.entity.js","sourceRoot":"","sources":["../../../../../../../packages/nest-auth/src/lib/role/entities/user-role.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA+F;AAC/F,iEAAuD;AACvD,+CAAqC;AACrC,uEAA6D;AAGtD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAwBpB,CAAA;AAxBY,4BAAQ;AAEjB;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;wCACP;AAGf;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;wCACP;AAGf;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;0CACL;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;sCACjE,kBAAI;sCAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;sCACjE,kBAAI;sCAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,CAAC;sCAChB,sBAAM;wCAAC;AAGf;IADC,IAAA,0BAAgB,GAAE;sCACR,IAAI;2CAAC;AAGhB;IADC,IAAA,0BAAgB,GAAE;sCACR,IAAI;2CAAC;mBAvBP,QAAQ;IADpB,IAAA,gBAAM,EAAC,sBAAsB,CAAC;GAClB,QAAQ,CAwBpB"}
|