@solcre-org/core-ui 2.24.0 → 2.26.0
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.
|
@@ -17766,12 +17766,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
17766
17766
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
17767
17767
|
// No edites manualmente este archivo
|
|
17768
17768
|
const VERSION = {
|
|
17769
|
-
full: '2.
|
|
17769
|
+
full: '2.26.0',
|
|
17770
17770
|
major: 2,
|
|
17771
|
-
minor:
|
|
17771
|
+
minor: 26,
|
|
17772
17772
|
patch: 0,
|
|
17773
|
-
timestamp: '2026-03-
|
|
17774
|
-
buildDate: '
|
|
17773
|
+
timestamp: '2026-03-27T13:08:49.542Z',
|
|
17774
|
+
buildDate: '27/3/2026'
|
|
17775
17775
|
};
|
|
17776
17776
|
|
|
17777
17777
|
class MainNavComponent {
|
|
@@ -22107,23 +22107,28 @@ class SecureAuth {
|
|
|
22107
22107
|
.pipe(switchMap((response) => {
|
|
22108
22108
|
const responseData = this.getResponseData(response);
|
|
22109
22109
|
const authToken = this.buildAuthToken(responseData);
|
|
22110
|
+
const eventData = this.getSuccessEventData(responseData);
|
|
22110
22111
|
if (!authToken.token) {
|
|
22111
22112
|
throw new Error('Secure auth validation response did not include a token.');
|
|
22112
22113
|
}
|
|
22113
22114
|
this.loadSessionToken(authToken, responseData);
|
|
22114
22115
|
return this.notifyAuthenticatedSession(responseData).pipe(map((user) => ({
|
|
22115
22116
|
response,
|
|
22116
|
-
user
|
|
22117
|
+
user,
|
|
22118
|
+
roles: eventData.roles,
|
|
22119
|
+
permissions: eventData.permissions
|
|
22117
22120
|
})));
|
|
22118
22121
|
}), finalize(() => this.loaderService.hideLoader(this.loaderRequestID)))
|
|
22119
22122
|
.subscribe({
|
|
22120
|
-
next: ({ response, user }) => {
|
|
22123
|
+
next: ({ response, user, roles, permissions }) => {
|
|
22121
22124
|
this.status.set(SECURE_AUTH_SCREEN_STATUS.SUCCESS);
|
|
22122
22125
|
this.validationEvent.emit({
|
|
22123
22126
|
type: SECURE_AUTH_VALIDATION_EVENT_TYPE.SUCCESS,
|
|
22124
22127
|
token,
|
|
22125
22128
|
response,
|
|
22126
|
-
user
|
|
22129
|
+
user,
|
|
22130
|
+
roles,
|
|
22131
|
+
permissions
|
|
22127
22132
|
});
|
|
22128
22133
|
},
|
|
22129
22134
|
error: (error) => {
|
|
@@ -22161,6 +22166,19 @@ class SecureAuth {
|
|
|
22161
22166
|
refreshToken: this.getStringValue(responseData['refresh_token']) ?? this.getStringValue(responseData['refreshToken']) ?? ''
|
|
22162
22167
|
};
|
|
22163
22168
|
}
|
|
22169
|
+
getSuccessEventData(responseData) {
|
|
22170
|
+
const responseUser = this.getObjectValue(responseData['user']);
|
|
22171
|
+
const roles = responseUser && this.hasOwnProperty(responseUser, 'roles')
|
|
22172
|
+
? responseUser['roles']
|
|
22173
|
+
: undefined;
|
|
22174
|
+
const permissions = responseUser && this.hasOwnProperty(responseUser, 'permissions')
|
|
22175
|
+
? responseUser['permissions']
|
|
22176
|
+
: undefined;
|
|
22177
|
+
return {
|
|
22178
|
+
roles,
|
|
22179
|
+
permissions
|
|
22180
|
+
};
|
|
22181
|
+
}
|
|
22164
22182
|
loadSessionToken(token, responseData) {
|
|
22165
22183
|
const tokenPayload = {
|
|
22166
22184
|
access_token: token.token
|
|
@@ -22183,6 +22201,9 @@ class SecureAuth {
|
|
|
22183
22201
|
? value
|
|
22184
22202
|
: null;
|
|
22185
22203
|
}
|
|
22204
|
+
hasOwnProperty(value, property) {
|
|
22205
|
+
return !!value && Object.prototype.hasOwnProperty.call(value, property);
|
|
22206
|
+
}
|
|
22186
22207
|
buildAuthUser(responseData) {
|
|
22187
22208
|
const user = this.getObjectValue(responseData['user']);
|
|
22188
22209
|
if (!user) {
|