monkey-front-core 0.0.382 → 0.0.383
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.
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +3 -2
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +8 -1
- package/fesm2015/monkey-front-core.mjs +6 -1
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +9 -1
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.383.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.382.tgz +0 -0
|
@@ -3649,6 +3649,13 @@ class MonkeyEcxTokenStorageService {
|
|
|
3649
3649
|
refreshToken
|
|
3650
3650
|
};
|
|
3651
3651
|
}
|
|
3652
|
+
if (!data.role) {
|
|
3653
|
+
const role = localStorage.getItem('role');
|
|
3654
|
+
data = {
|
|
3655
|
+
...data,
|
|
3656
|
+
role
|
|
3657
|
+
};
|
|
3658
|
+
}
|
|
3652
3659
|
const handledData = {
|
|
3653
3660
|
...data,
|
|
3654
3661
|
accessType,
|
|
@@ -3798,7 +3805,8 @@ class MonkeyEcxSecurityDirective {
|
|
|
3798
3805
|
if (tokenCredentials?.programAdmin === true) {
|
|
3799
3806
|
return 'PROGRAM_ADMIN';
|
|
3800
3807
|
}
|
|
3801
|
-
|
|
3808
|
+
const handledRole = localStorage.getItem('role');
|
|
3809
|
+
return tokenCredentials?.role || handledRole || '';
|
|
3802
3810
|
}
|
|
3803
3811
|
handleAccess() {
|
|
3804
3812
|
const { roles, byExclusion } = this;
|