emilsoftware-utilities 1.3.124 → 1.3.126

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.
@@ -36,14 +36,11 @@ let AuthService = class AuthService {
36
36
  }
37
37
  login(request) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- if (this.accessiOptions.mockDemoUser &&
40
- request.email.toLowerCase() === "demo")
39
+ if (this.accessiOptions.mockDemoUser && request.email.toLowerCase() === "demo")
41
40
  return this.getDemoUser();
42
- if (this.accessiOptions.mockDemoUser &&
43
- request.email.toLowerCase() === "admin")
41
+ if (this.accessiOptions.mockDemoUser && request.email.toLowerCase() === "admin")
44
42
  return this.getAdminUser();
45
43
  const passwordCifrata = Utilities_1.CryptUtilities.encrypt(request.password, this.accessiOptions.encryptionKey);
46
- // Recupera l'utente dal database
47
44
  const utente = yield this.userService.getUserByEmail(request.email.toLowerCase());
48
45
  if (!utente)
49
46
  throw new Error("Nome utente o password errata!");
@@ -107,7 +104,7 @@ let AuthService = class AuthService {
107
104
  }
108
105
  getAdminUser() {
109
106
  return __awaiter(this, void 0, void 0, function* () {
110
- const filtri = yield this.userService.getUserFilters(6789);
107
+ ///const filtri = await this.userService.getUserFilters(6789);
111
108
  return {
112
109
  utente: {
113
110
  codiceUtente: 6789,
@@ -125,7 +122,7 @@ let AuthService = class AuthService {
125
122
  roles: [],
126
123
  permissions: [],
127
124
  },
128
- filtri,
125
+ filtri: null,
129
126
  userGrants: {
130
127
  abilitazioni: [],
131
128
  grants: [],
@@ -272,7 +272,8 @@ let PermissionService = class PermissionService {
272
272
  INNER JOIN MENU_GRP G ON G.CODGRP = M.CODGRP
273
273
  WHERE RU.CODUTE = ? AND M.FLGENABLED = 1 AND G.FLGENABLED = 1
274
274
  `;
275
- const ruoliResult = yield Orm_1.Orm.query(this.accessiOptions.databaseOptions, queryRuoli, [codiceUtente]);
275
+ let ruoliResult = yield Orm_1.Orm.query(this.accessiOptions.databaseOptions, queryRuoli, [codiceUtente]);
276
+ ruoliResult = ruoliResult.map(Utilities_1.RestUtilities.convertKeysToCamelCase);
276
277
  const ruoliMap = new Map();
277
278
  for (const row of ruoliResult) {
278
279
  const { codiceRuolo, descrizioneRuolo, codiceMenu, descrizioneMenu, tipoAbilitazione } = row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emilsoftware-utilities",
3
- "version": "1.3.124",
3
+ "version": "1.3.126",
4
4
  "description": "Utilities for EmilSoftware",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",