@tomei/sso 0.34.11 → 0.35.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/components/system/system.d.ts +1 -0
- package/dist/src/components/system/system.js +36 -0
- package/dist/src/components/system/system.js.map +1 -1
- package/dist/src/components/system-privilege/system-privilege.d.ts +1 -0
- package/dist/src/components/system-privilege/system-privilege.js +36 -0
- package/dist/src/components/system-privilege/system-privilege.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/system/system.ts +68 -1
- package/src/components/system-privilege/system-privilege.ts +80 -1
@@ -259,6 +259,42 @@ class System extends general_1.ObjectBase {
|
|
259
259
|
}
|
260
260
|
});
|
261
261
|
}
|
262
|
+
static loadSystem(dbTransaction) {
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
264
|
+
try {
|
265
|
+
config_1.ComponentConfig.loadComponentConfig('./component-config/sso-config.json');
|
266
|
+
const config = config_1.ComponentConfig.getComponentConfigValue('@tomei/sso', 'system');
|
267
|
+
if (!config.name ||
|
268
|
+
!config.code ||
|
269
|
+
!config.description ||
|
270
|
+
!config.userId) {
|
271
|
+
throw new Error('Missing required fields in the config file.');
|
272
|
+
}
|
273
|
+
const system = yield System._Repo.findByPk(config.code, {
|
274
|
+
transaction: dbTransaction,
|
275
|
+
});
|
276
|
+
if (system) {
|
277
|
+
return 'System loaded.';
|
278
|
+
}
|
279
|
+
yield System._Repo.create({
|
280
|
+
SystemCode: config.code,
|
281
|
+
Name: config.name,
|
282
|
+
Description: config.description,
|
283
|
+
Status: 'Active',
|
284
|
+
CreatedById: config.userId,
|
285
|
+
CreatedAt: new Date(),
|
286
|
+
UpdatedById: config.userId,
|
287
|
+
UpdatedAt: new Date(),
|
288
|
+
}, {
|
289
|
+
transaction: dbTransaction,
|
290
|
+
});
|
291
|
+
return 'System loaded.';
|
292
|
+
}
|
293
|
+
catch (error) {
|
294
|
+
throw error;
|
295
|
+
}
|
296
|
+
});
|
297
|
+
}
|
262
298
|
}
|
263
299
|
exports.System = System;
|
264
300
|
System._Repo = new system_repository_1.SystemRepository();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../src/components/system/system.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAmE;AACnE,2DAAuD;AAGvD,
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../src/components/system/system.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAmE;AACnE,2DAAuD;AAGvD,0CAAmE;AACnE,8DAA+D;AAE/D,yCAA+B;AAC/B,+BAAoC;AAEpC,MAAa,MAAO,SAAQ,oBAAU;IAsBpC,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,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,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,YAAoB,UAAwB;QAC1C,KAAK,EAAE,CAAC;QApCV,cAAS,GAAG,YAAY,CAAC;QACzB,eAAU,GAAG,QAAQ,CAAC;QAoCpB,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;YACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YAC5B,IAAI,CAAC,WAAW,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,CAAC;YAC3C,IAAI,CAAC,SAAS,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAC;YACvC,IAAI,CAAC,aAAa,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,CAAC;YAC/C,IAAI,CAAC,aAAa,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,CAAC;YAC/C,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AAE,MAAM,CAAC,IAAI;oBACvB,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,MAAM,CAAC,MAAM;oBAC1B,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,WAAW,EAAE,MAAM,CAAC,MAAM;oBAC1B,SAAS,EAAE,IAAI,IAAI,EAAE;iBACtB,EACD;oBACE,WAAW,EAAE,aAAa;iBAC3B,CACF,CAAC;gBAEF,OAAO,gBAAgB,CAAC;aACzB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;;AA3bH,wBA4bC;AAxagB,YAAK,GAAG,IAAI,oCAAgB,EAAE,CAAC"}
|
@@ -190,6 +190,42 @@ class SystemPrivilege extends general_1.ObjectBase {
|
|
190
190
|
}
|
191
191
|
});
|
192
192
|
}
|
193
|
+
static loadAllPrivileges(dbTransaction, systemCode) {
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
195
|
+
try {
|
196
|
+
yield system_1.System.init(dbTransaction, systemCode);
|
197
|
+
config_1.ComponentConfig.loadComponentConfig('./component-config/sso-config.json');
|
198
|
+
const privilegesConfig = config_1.ComponentConfig.getComponentConfigValue('@tomei/sso', 'privileges');
|
199
|
+
const systemConfig = config_1.ComponentConfig.getComponentConfigValue('@tomei/sso', 'system');
|
200
|
+
const systemUserId = systemConfig.userId;
|
201
|
+
const existingSystemPrivileges = yield this._Repository.findAll({
|
202
|
+
where: {
|
203
|
+
SystemCode: systemCode,
|
204
|
+
},
|
205
|
+
transaction: dbTransaction,
|
206
|
+
});
|
207
|
+
const tobeCreatePrivileges = privilegesConfig.filter((privilegeConfig) => !existingSystemPrivileges.find((existingPrivilege) => existingPrivilege.PrivilegeCode === privilegeConfig.privilegeCode));
|
208
|
+
for (const privilegeConfig of tobeCreatePrivileges) {
|
209
|
+
yield this._Repository.create({
|
210
|
+
PrivilegeCode: privilegeConfig.privilegeCode,
|
211
|
+
SystemCode: systemCode,
|
212
|
+
Description: privilegeConfig.description,
|
213
|
+
Status: 'Active',
|
214
|
+
CreatedById: parseInt(systemUserId),
|
215
|
+
UpdatedById: parseInt(systemUserId),
|
216
|
+
CreatedAt: new Date(),
|
217
|
+
UpdatedAt: new Date(),
|
218
|
+
}, {
|
219
|
+
transaction: dbTransaction,
|
220
|
+
});
|
221
|
+
}
|
222
|
+
return 'Privileges Loaded';
|
223
|
+
}
|
224
|
+
catch (error) {
|
225
|
+
throw error;
|
226
|
+
}
|
227
|
+
});
|
228
|
+
}
|
193
229
|
}
|
194
230
|
exports.SystemPrivilege = SystemPrivilege;
|
195
231
|
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,
|
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;IAa7C,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,aAAa,CAAC,KAAa;QAC7B,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,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