@flusys/nestjs-iam 5.0.3 → 5.0.4
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/cjs/controllers/company-action-permission.controller.js +1 -1
- package/cjs/controllers/role-permission.controller.js +1 -1
- package/cjs/controllers/user-action-permission.controller.js +1 -1
- package/cjs/services/action.service.js +1 -1
- package/fesm/controllers/company-action-permission.controller.js +2 -2
- package/fesm/controllers/role-permission.controller.js +2 -2
- package/fesm/controllers/user-action-permission.controller.js +2 -2
- package/fesm/services/action.service.js +1 -1
- package/fesm/services/role.service.js +1 -1
- package/package.json +3 -3
- package/services/action.service.d.ts +2 -2
- package/services/role.service.d.ts +3 -3
|
@@ -109,7 +109,7 @@ _ts_decorate([
|
|
|
109
109
|
CompanyActionPermissionController = _ts_decorate([
|
|
110
110
|
(0, _swagger.ApiTags)('IAM - Company Action Permissions'),
|
|
111
111
|
(0, _common.Controller)('iam/permissions'),
|
|
112
|
-
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard),
|
|
112
|
+
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard, _nestjsshared.PermissionGuard),
|
|
113
113
|
(0, _swagger.ApiBearerAuth)(),
|
|
114
114
|
_ts_param(0, (0, _common.Inject)(_permissionservice.PermissionService)),
|
|
115
115
|
_ts_metadata("design:type", Function),
|
|
@@ -179,7 +179,7 @@ _ts_decorate([
|
|
|
179
179
|
RolePermissionController = _ts_decorate([
|
|
180
180
|
(0, _swagger.ApiTags)('IAM - Role Permissions'),
|
|
181
181
|
(0, _common.Controller)('iam/permissions'),
|
|
182
|
-
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard),
|
|
182
|
+
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard, _nestjsshared.PermissionGuard),
|
|
183
183
|
(0, _swagger.ApiBearerAuth)(),
|
|
184
184
|
_ts_param(0, (0, _common.Inject)(_permissionservice.PermissionService)),
|
|
185
185
|
_ts_param(1, (0, _common.Inject)(_iamconfigservice.IAMConfigService)),
|
|
@@ -120,7 +120,7 @@ _ts_decorate([
|
|
|
120
120
|
UserActionPermissionController = _ts_decorate([
|
|
121
121
|
(0, _swagger.ApiTags)('IAM - User Action Permissions'),
|
|
122
122
|
(0, _common.Controller)('iam/permissions'),
|
|
123
|
-
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard),
|
|
123
|
+
(0, _common.UseGuards)(_nestjsshared.JwtAuthGuard, _nestjsshared.PermissionGuard),
|
|
124
124
|
(0, _swagger.ApiBearerAuth)(),
|
|
125
125
|
_ts_param(0, (0, _common.Inject)(_permissionservice.PermissionService)),
|
|
126
126
|
_ts_param(1, (0, _common.Inject)(_iamconfigservice.IAMConfigService)),
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "ActionService", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _classes = require("@flusys/nestjs-shared/classes");
|
|
12
|
-
const _config = require("../config");
|
|
13
12
|
const _modules = require("@flusys/nestjs-shared/modules");
|
|
14
13
|
const _common = require("@nestjs/common");
|
|
15
14
|
const _typeorm = require("typeorm");
|
|
15
|
+
const _config = require("../config");
|
|
16
16
|
const _actionentity = require("../entities/action.entity");
|
|
17
17
|
const _iamconfigservice = require("./iam-config.service");
|
|
18
18
|
const _iamdatasourceservice = require("./iam-datasource.service");
|
|
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
|
|
|
25
25
|
decorator(target, key, paramIndex);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
import { ApiResponseDto, COMPANY_ACTION_PERMISSIONS, JwtAuthGuard, RequirePermission } from '@flusys/nestjs-shared';
|
|
28
|
+
import { ApiResponseDto, COMPANY_ACTION_PERMISSIONS, JwtAuthGuard, PermissionGuard, RequirePermission } from '@flusys/nestjs-shared';
|
|
29
29
|
import { Body, Controller, Inject, Post, UseGuards } from '@nestjs/common';
|
|
30
30
|
import { ApiBearerAuth, ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
31
31
|
import { COMPANY_ACTION_PERMISSION_MESSAGES, PERMISSION_OPERATION_MESSAGES } from '../config';
|
|
@@ -99,7 +99,7 @@ _ts_decorate([
|
|
|
99
99
|
CompanyActionPermissionController = _ts_decorate([
|
|
100
100
|
ApiTags('IAM - Company Action Permissions'),
|
|
101
101
|
Controller('iam/permissions'),
|
|
102
|
-
UseGuards(JwtAuthGuard),
|
|
102
|
+
UseGuards(JwtAuthGuard, PermissionGuard),
|
|
103
103
|
ApiBearerAuth(),
|
|
104
104
|
_ts_param(0, Inject(PermissionService)),
|
|
105
105
|
_ts_metadata("design:type", Function),
|
|
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
|
|
|
25
25
|
decorator(target, key, paramIndex);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
import { ApiResponseDto, CurrentUser, ILoggedUserInfo, JwtAuthGuard, RequirePermission, ROLE_ACTION_PERMISSIONS, USER_ROLE_PERMISSIONS } from '@flusys/nestjs-shared';
|
|
28
|
+
import { ApiResponseDto, CurrentUser, ILoggedUserInfo, JwtAuthGuard, PermissionGuard, RequirePermission, ROLE_ACTION_PERMISSIONS, USER_ROLE_PERMISSIONS } from '@flusys/nestjs-shared';
|
|
29
29
|
import { Body, Controller, Inject, Post, UseGuards } from '@nestjs/common';
|
|
30
30
|
import { ApiBearerAuth, ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
31
31
|
import { PERMISSION_OPERATION_MESSAGES, ROLE_PERMISSION_MESSAGES } from '../config';
|
|
@@ -169,7 +169,7 @@ _ts_decorate([
|
|
|
169
169
|
RolePermissionController = _ts_decorate([
|
|
170
170
|
ApiTags('IAM - Role Permissions'),
|
|
171
171
|
Controller('iam/permissions'),
|
|
172
|
-
UseGuards(JwtAuthGuard),
|
|
172
|
+
UseGuards(JwtAuthGuard, PermissionGuard),
|
|
173
173
|
ApiBearerAuth(),
|
|
174
174
|
_ts_param(0, Inject(PermissionService)),
|
|
175
175
|
_ts_param(1, Inject(IAMConfigService)),
|
|
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
|
|
|
25
25
|
decorator(target, key, paramIndex);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
import { ApiResponseDto, CurrentUser, ILoggedUserInfo, JwtAuthGuard, RequirePermission, USER_ACTION_PERMISSIONS } from '@flusys/nestjs-shared';
|
|
28
|
+
import { ApiResponseDto, CurrentUser, ILoggedUserInfo, JwtAuthGuard, PermissionGuard, RequirePermission, USER_ACTION_PERMISSIONS } from '@flusys/nestjs-shared';
|
|
29
29
|
import { Body, Controller, Inject, Post, UseGuards } from '@nestjs/common';
|
|
30
30
|
import { ApiBearerAuth, ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger';
|
|
31
31
|
import { PERMISSION_OPERATION_MESSAGES, USER_ACTION_PERMISSION_MESSAGES } from '../config';
|
|
@@ -110,7 +110,7 @@ _ts_decorate([
|
|
|
110
110
|
UserActionPermissionController = _ts_decorate([
|
|
111
111
|
ApiTags('IAM - User Action Permissions'),
|
|
112
112
|
Controller('iam/permissions'),
|
|
113
|
-
UseGuards(JwtAuthGuard),
|
|
113
|
+
UseGuards(JwtAuthGuard, PermissionGuard),
|
|
114
114
|
ApiBearerAuth(),
|
|
115
115
|
_ts_param(0, Inject(PermissionService)),
|
|
116
116
|
_ts_param(1, Inject(IAMConfigService)),
|
|
@@ -26,10 +26,10 @@ function _ts_param(paramIndex, decorator) {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
|
|
29
|
-
import { PERMISSION_OPERATION_MESSAGES } from '../config';
|
|
30
29
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
31
30
|
import { BadRequestException, Inject, Injectable, Scope } from '@nestjs/common';
|
|
32
31
|
import { In } from 'typeorm';
|
|
32
|
+
import { PERMISSION_OPERATION_MESSAGES } from '../config';
|
|
33
33
|
import { Action } from '../entities/action.entity';
|
|
34
34
|
import { IAMConfigService } from './iam-config.service';
|
|
35
35
|
import { IAMDataSourceService } from './iam-datasource.service';
|
|
@@ -25,7 +25,7 @@ function _ts_param(paramIndex, decorator) {
|
|
|
25
25
|
decorator(target, key, paramIndex);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
import {
|
|
28
|
+
import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
|
|
29
29
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
30
30
|
import { applyCompanyFilter } from '@flusys/nestjs-shared/utils';
|
|
31
31
|
import { Inject, Injectable, Scope } from '@nestjs/common';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/nestjs-iam",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Identity and Access Management (IAM) module for NestJS applications",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "fesm/index.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"express": "^4.18.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@flusys/nestjs-core": "5.0.
|
|
94
|
-
"@flusys/nestjs-shared": "5.0.
|
|
93
|
+
"@flusys/nestjs-core": "5.0.4",
|
|
94
|
+
"@flusys/nestjs-shared": "5.0.4"
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
|
|
2
2
|
import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
|
|
3
3
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
4
|
-
import { EntityTarget,
|
|
4
|
+
import { EntityTarget, SelectQueryBuilder } from 'typeorm';
|
|
5
5
|
import { CreateActionDto, UpdateActionDto } from '../dtos/action.dto';
|
|
6
6
|
import { ActionBase } from '../entities/action-base.entity';
|
|
7
7
|
import { IAction, IActionTree } from '../interfaces/action.interface';
|
|
8
8
|
import { IAMConfigService } from './iam-config.service';
|
|
9
9
|
import { IAMDataSourceService } from './iam-datasource.service';
|
|
10
10
|
import { PermissionService } from './permission.service';
|
|
11
|
-
export declare class ActionService extends RequestScopedApiService<CreateActionDto, UpdateActionDto, IAction, ActionBase
|
|
11
|
+
export declare class ActionService extends RequestScopedApiService<CreateActionDto, UpdateActionDto, IAction, ActionBase> {
|
|
12
12
|
protected cacheManager: HybridCache;
|
|
13
13
|
protected utilsService: UtilsService;
|
|
14
14
|
private readonly iamConfigService;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HybridCache, RequestScopedApiService } from '@flusys/nestjs-shared/classes';
|
|
2
2
|
import { ILoggedUserInfo } from '@flusys/nestjs-shared/interfaces';
|
|
3
3
|
import { UtilsService } from '@flusys/nestjs-shared/modules';
|
|
4
|
-
import { EntityTarget,
|
|
4
|
+
import { EntityTarget, SelectQueryBuilder } from 'typeorm';
|
|
5
5
|
import { CreateRoleDto, UpdateRoleDto } from '../dtos/role.dto';
|
|
6
6
|
import { RoleBase } from '../entities/role-base.entity';
|
|
7
7
|
import { IRole } from '../interfaces/role.interface';
|
|
8
8
|
import { IAMConfigService } from './iam-config.service';
|
|
9
9
|
import { IAMDataSourceService } from './iam-datasource.service';
|
|
10
|
-
export declare class RoleService extends RequestScopedApiService<CreateRoleDto, UpdateRoleDto, IRole, RoleBase
|
|
10
|
+
export declare class RoleService extends RequestScopedApiService<CreateRoleDto, UpdateRoleDto, IRole, RoleBase> {
|
|
11
11
|
protected cacheManager: HybridCache;
|
|
12
12
|
protected utilsService: UtilsService;
|
|
13
13
|
private readonly iamConfigService;
|