emilsoftware-utilities 1.3.125 → 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 =
|
|
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: [],
|