@tomei/sso 0.49.1 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/components/system-privilege/system-privilege.d.ts +1 -0
- package/dist/src/components/system-privilege/system-privilege.js +41 -1
- package/dist/src/components/system-privilege/system-privilege.js.map +1 -1
- package/dist/src/components/system-privilege/system-privilege.repository.d.ts +1 -0
- package/dist/src/components/system-privilege/system-privilege.repository.js +17 -0
- package/dist/src/components/system-privilege/system-privilege.repository.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/system-privilege/system-privilege.repository.ts +7 -0
- package/src/components/system-privilege/system-privilege.ts +71 -1
@@ -144,7 +144,7 @@ class SystemPrivilege extends general_1.ObjectBase {
|
|
144
144
|
activity.Action = activity_history_1.ActionEnum.CREATE;
|
145
145
|
activity.Description = 'Add System Privilege';
|
146
146
|
activity.EntityType = 'SystemPrivilege';
|
147
|
-
activity.EntityId = newSystemPrivilege.
|
147
|
+
activity.EntityId = newSystemPrivilege.SystemPrivilegeId;
|
148
148
|
activity.EntityValueBefore = JSON.stringify(EntityValueBefore);
|
149
149
|
activity.EntityValueAfter = JSON.stringify(EntityValueAfter);
|
150
150
|
yield activity.create(loginUser.ObjectId, dbTransaction);
|
@@ -235,6 +235,46 @@ class SystemPrivilege extends general_1.ObjectBase {
|
|
235
235
|
}
|
236
236
|
});
|
237
237
|
}
|
238
|
+
delete(dbTransaction, loginUser) {
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
240
|
+
try {
|
241
|
+
const systemCode = config_1.ApplicationConfig.getComponentConfigValue('system-code');
|
242
|
+
const isPrivileged = yield loginUser.checkPrivileges(systemCode, 'PRIVILEGE_DELETE');
|
243
|
+
if (!isPrivileged) {
|
244
|
+
throw new general_1.ClassError('SystemPrivilege', 'SystemPrivilegeErrMsg0X', 'You do not have permission to delete system privileges');
|
245
|
+
}
|
246
|
+
if (!this.SystemPrivilegeId) {
|
247
|
+
throw new general_1.ClassError('SystemPrivilege', 'SystemPrivilegeErrMsg02', 'System Privilege Id is required');
|
248
|
+
}
|
249
|
+
yield SystemPrivilege._Repository.delete(this.SystemPrivilegeId, dbTransaction);
|
250
|
+
const EntityValueBefore = {
|
251
|
+
SystemPrivilegeId: this.ObjectId,
|
252
|
+
PrivilegeCode: this.PrivilegeCode,
|
253
|
+
SystemCode: this.SystemCode,
|
254
|
+
Description: this.Description,
|
255
|
+
Status: this.Status,
|
256
|
+
CreatedById: this._CreatedById,
|
257
|
+
UpdatedById: this._UpdatedById,
|
258
|
+
CreatedAt: this._CreatedAt,
|
259
|
+
UpdatedAt: this._UpdatedAt,
|
260
|
+
};
|
261
|
+
const EntityValueAfter = {};
|
262
|
+
const activity = new activity_history_1.Activity();
|
263
|
+
activity.ActivityId = activity.createId();
|
264
|
+
activity.Action = activity_history_1.ActionEnum.DELETE;
|
265
|
+
activity.Description = 'Delete System Privilege';
|
266
|
+
activity.EntityType = 'SystemPrivilege';
|
267
|
+
activity.EntityId = this.SystemPrivilegeId;
|
268
|
+
activity.EntityValueBefore = JSON.stringify(EntityValueBefore);
|
269
|
+
activity.EntityValueAfter = JSON.stringify(EntityValueAfter);
|
270
|
+
yield activity.create(loginUser.ObjectId, dbTransaction);
|
271
|
+
return this;
|
272
|
+
}
|
273
|
+
catch (error) {
|
274
|
+
throw error;
|
275
|
+
}
|
276
|
+
});
|
277
|
+
}
|
238
278
|
}
|
239
279
|
exports.SystemPrivilege = SystemPrivilege;
|
240
280
|
SystemPrivilege._Repository = new system_privilege_repository_1.SystemPrivilegeRepository();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system-privilege.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,mEAA+D;AAC/D,+EAA0E;AAG1E,0CAAmE;AACnE,6CAA0C;AAC1C,8DAA+D;AAE/D,yCAA+B;AAE/B,MAAa,eAAgB,SAAQ,oBAAU;IAc7C,IAAI,iB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ACpC,QAAQ,CAAC,WAAW,GAAG,sBAAsB,CAAC;gBAC9C,QAAQ,CAAC,UAAU,GAAG,iBAAiB,CAAC;gBACxC,QAAQ,CAAC,QAAQ,GAAG,kBAAkB,CAAC,
|
1
|
+
{"version":3,"file":"system-privilege.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,mEAA+D;AAC/D,+EAA0E;AAG1E,0CAAmE;AACnE,6CAA0C;AAC1C,8DAA+D;AAE/D,yCAA+B;AAE/B,MAAa,eAAgB,SAAQ,oBAAU;IAc7C,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,iBAAiB,CAAC,KAAa;QACjC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAKD,YAAoB,mBAA0C;QAC5D,KAAK,EAAE,CAAC;QAzCV,eAAU,GAAG,iBAAiB,CAAC;QAC/B,cAAS,GAAG,qBAAqB,CAAC;QAyChC,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC;YAC/D,IAAI,CAAC,aAAa,GAAG,mBAAmB,CAAC,aAAa,CAAC;YACvD,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;YACjD,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;Y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B,MAAM,QAAQ,GAAG,IAAI,2BAAQ,EAAE,CAAC;gBAChC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBAC1C,QAAQ,CAAC,MAAM,GAAG,6BAAU,CAAC,MAAM,CAAC;gBACpC,QAAQ,CAAC,WAAW,GAAG,yBAAyB,CAAC;gBACjD,QAAQ,CAAC,UAAU,GAAG,iBAAiB,CAAC;gBACxC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC;gBAC3C,QAAQ,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;gBAC/D,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;gBAG7D,MAAM,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAEzD,OAAO,IAAI,CAAC;aACb;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;;AAtbH,0CAubC;AAjZgB,2BAAW,GAAG,IAAI,uDAAyB,EAAE,CAAC;AAC9C,iCAAiB,GAAG,IAAI,oCAAgB,EAAE,CAAC"}
|
@@ -2,4 +2,5 @@ import SystemPrivilege from '../../models/system-privilege.entity';
|
|
2
2
|
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
3
3
|
export declare class SystemPrivilegeRepository extends RepositoryBase<SystemPrivilege> implements IRepositoryBase<SystemPrivilege> {
|
4
4
|
constructor();
|
5
|
+
delete(systemPrivilegeId: string, dbTransaction?: any): Promise<number>;
|
5
6
|
}
|
@@ -1,4 +1,13 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
12
|
exports.SystemPrivilegeRepository = void 0;
|
4
13
|
const system_privilege_entity_1 = require("../../models/system-privilege.entity");
|
@@ -7,6 +16,14 @@ class SystemPrivilegeRepository extends general_1.RepositoryBase {
|
|
7
16
|
constructor() {
|
8
17
|
super(system_privilege_entity_1.default);
|
9
18
|
}
|
19
|
+
delete(systemPrivilegeId, dbTransaction) {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
return yield system_privilege_entity_1.default.destroy({
|
22
|
+
where: { SystemPrivilegeId: systemPrivilegeId },
|
23
|
+
transaction: dbTransaction,
|
24
|
+
});
|
25
|
+
});
|
26
|
+
}
|
10
27
|
}
|
11
28
|
exports.SystemPrivilegeRepository = SystemPrivilegeRepository;
|
12
29
|
//# sourceMappingURL=system-privilege.repository.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system-privilege.repository.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.repository.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"system-privilege.repository.js","sourceRoot":"","sources":["../../../../src/components/system-privilege/system-privilege.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAAmE;AACnE,4CAAiE;AAEjE,MAAa,yBACX,SAAQ,wBAA+B;IAGvC;QACE,KAAK,CAAC,iCAAe,CAAC,CAAC;IACzB,CAAC;IAEK,MAAM,CAAC,iBAAyB,EAAE,aAAmB;;YACzD,OAAO,MAAM,iCAAe,CAAC,OAAO,CAAC;gBACnC,KAAK,EAAE,EAAE,iBAAiB,EAAE,iBAAiB,EAAE;gBAC/C,WAAW,EAAE,aAAa;aAC3B,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAdD,8DAcC"}
|