rez_core 1.0.30 → 1.0.31
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/constant/status.constant.d.ts +4 -0
- package/dist/constant/status.constant.js +9 -0
- package/dist/constant/status.constant.js.map +1 -0
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/enterprise/controller/organization.controller.d.ts +7 -0
- package/dist/module/enterprise/controller/organization.controller.js +40 -0
- package/dist/module/enterprise/controller/organization.controller.js.map +1 -0
- package/dist/module/enterprise/enterprise.module.js +2 -0
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/resources/dev.properties.yaml +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +29 -29
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/controller/organization.controller.ts +16 -0
- package/src/module/enterprise/enterprise.module.ts +2 -0
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization.entity.ts +80 -80
- package/src/module/master/controller/master.controller.ts +22 -22
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/entity/attribute-master.entity.ts +67 -67
- package/src/module/meta/entity/preference.entity.ts +65 -65
- package/src/module/meta/repository/attribute-master.repository.ts +28 -28
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/entity/module-access.entity.ts +22 -22
- package/src/module/module/entity/module-action.entity.ts +19 -19
- package/src/module/user/controller/user.controller.ts +28 -28
- package/src/module/user/dto/update-user.dto.ts +4 -4
- package/src/module/user/entity/user-role-mapping.entity.ts +21 -21
- package/src/module/user/entity/user-session.entity.ts +61 -61
- package/src/module/user/entity/user.entity.ts +35 -35
- package/src/module/user/repository/role.repository.ts +16 -16
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/reflection-helper.service.ts +53 -53
- package/.idea/250218_nodejs_core.iml +0 -12
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/dataSources.xml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusType = void 0;
|
|
4
|
+
var StatusType;
|
|
5
|
+
(function (StatusType) {
|
|
6
|
+
StatusType[StatusType["ACTIVE"] = 0] = "ACTIVE";
|
|
7
|
+
StatusType[StatusType["INACTIVE"] = 1] = "INACTIVE";
|
|
8
|
+
})(StatusType || (exports.StatusType = StatusType = {}));
|
|
9
|
+
//# sourceMappingURL=status.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.constant.js","sourceRoot":"","sources":["../../src/constant/status.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,+CAAM,CAAA;IAAE,mDAAQ,CAAA;AACpB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
|
|
@@ -34,9 +34,9 @@ let RolesGuard = class RolesGuard {
|
|
|
34
34
|
}
|
|
35
35
|
const requiredModule = this.reflector.get('moduleCode', context.getHandler());
|
|
36
36
|
const requiredActions = this.reflector.get('actions', context.getHandler());
|
|
37
|
-
const roleAccess = await this.entityManager.query(`SELECT *
|
|
38
|
-
FROM cr_module_access
|
|
39
|
-
WHERE role_id = ${user['role_id']}
|
|
37
|
+
const roleAccess = await this.entityManager.query(`SELECT *
|
|
38
|
+
FROM cr_module_access
|
|
39
|
+
WHERE role_id = ${user['role_id']}
|
|
40
40
|
AND module_code = '${requiredModule}'`);
|
|
41
41
|
if (!roleAccess || roleAccess.length === 0) {
|
|
42
42
|
throw new common_1.ForbiddenException('Access denied: No permissions found for this module');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OrganizationService } from '../service/organization.service';
|
|
2
|
+
import { Request } from 'express';
|
|
3
|
+
export declare class OrganizationController {
|
|
4
|
+
private readonly orgService;
|
|
5
|
+
constructor(orgService: OrganizationService);
|
|
6
|
+
getOrganizationDropdown(req: Request): Promise<import("../entity/organization.entity").OrganizationData[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.OrganizationController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const organization_service_1 = require("../service/organization.service");
|
|
18
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
19
|
+
let OrganizationController = class OrganizationController {
|
|
20
|
+
constructor(orgService) {
|
|
21
|
+
this.orgService = orgService;
|
|
22
|
+
}
|
|
23
|
+
async getOrganizationDropdown(req) {
|
|
24
|
+
return this.orgService.findAll();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.OrganizationController = OrganizationController;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
30
|
+
(0, common_1.Get)('dropdown'),
|
|
31
|
+
__param(0, (0, common_1.Req)()),
|
|
32
|
+
__metadata("design:type", Function),
|
|
33
|
+
__metadata("design:paramtypes", [Object]),
|
|
34
|
+
__metadata("design:returntype", Promise)
|
|
35
|
+
], OrganizationController.prototype, "getOrganizationDropdown", null);
|
|
36
|
+
exports.OrganizationController = OrganizationController = __decorate([
|
|
37
|
+
(0, common_1.Controller)('organization'),
|
|
38
|
+
__metadata("design:paramtypes", [organization_service_1.OrganizationService])
|
|
39
|
+
], OrganizationController);
|
|
40
|
+
//# sourceMappingURL=organization.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.controller.js","sourceRoot":"","sources":["../../../../src/module/enterprise/controller/organization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,0EAAsE;AAEtE,2DAAgE;AAGzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAA6B,UAA+B;QAA/B,eAAU,GAAV,UAAU,CAAqB;IAAG,CAAC;IAI1D,AAAN,KAAK,CAAC,uBAAuB,CAAQ,GAAY;QAE/C,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACnC,CAAC;CACF,CAAA;AATY,wDAAsB;AAK3B;IAFL,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACvB,IAAA,YAAG,EAAC,UAAU,CAAC;IACe,WAAA,IAAA,YAAG,GAAE,CAAA;;;;qEAGnC;iCARU,sBAAsB;IADlC,IAAA,mBAAU,EAAC,cAAc,CAAC;qCAEgB,0CAAmB;GADjD,sBAAsB,CASlC"}
|
|
@@ -11,12 +11,14 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
12
|
const organization_service_1 = require("./service/organization.service");
|
|
13
13
|
const organization_entity_1 = require("./entity/organization.entity");
|
|
14
|
+
const organization_controller_1 = require("./controller/organization.controller");
|
|
14
15
|
let EnterpriseModule = class EnterpriseModule {
|
|
15
16
|
};
|
|
16
17
|
exports.EnterpriseModule = EnterpriseModule;
|
|
17
18
|
exports.EnterpriseModule = EnterpriseModule = __decorate([
|
|
18
19
|
(0, common_1.Module)({
|
|
19
20
|
imports: [typeorm_1.TypeOrmModule.forFeature([organization_entity_1.OrganizationData])],
|
|
21
|
+
controllers: [organization_controller_1.OrganizationController],
|
|
20
22
|
providers: [organization_service_1.OrganizationService],
|
|
21
23
|
exports: [organization_service_1.OrganizationService],
|
|
22
24
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yEAAqE;AACrE,sEAAgE;
|
|
1
|
+
{"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yEAAqE;AACrE,sEAAgE;AAChE,kFAA8E;AAQvE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,sCAAgB,CAAC,CAAC,CAAC;QACvD,WAAW,EAAC,CAAC,gDAAsB,CAAC;QACpC,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG"}
|