monkey-front-core 0.0.381 → 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.
@@ -3623,7 +3623,8 @@ class MonkeyEcxTokenStorageService {
3623
3623
  const username = localStorage.getItem('username');
3624
3624
  let data = {
3625
3625
  username: username || '',
3626
- program: ''
3626
+ program: '',
3627
+ accessToken: ''
3627
3628
  };
3628
3629
  if (username) {
3629
3630
  data = await store.select(select({ username })).pipe(take(1)).toPromise();
@@ -3648,6 +3649,13 @@ class MonkeyEcxTokenStorageService {
3648
3649
  refreshToken
3649
3650
  };
3650
3651
  }
3652
+ if (!data.role) {
3653
+ const role = localStorage.getItem('role');
3654
+ data = {
3655
+ ...data,
3656
+ role
3657
+ };
3658
+ }
3651
3659
  const handledData = {
3652
3660
  ...data,
3653
3661
  accessType,
@@ -3797,7 +3805,8 @@ class MonkeyEcxSecurityDirective {
3797
3805
  if (tokenCredentials?.programAdmin === true) {
3798
3806
  return 'PROGRAM_ADMIN';
3799
3807
  }
3800
- return tokenCredentials?.role || '';
3808
+ const handledRole = localStorage.getItem('role');
3809
+ return tokenCredentials?.role || handledRole || '';
3801
3810
  }
3802
3811
  handleAccess() {
3803
3812
  const { roles, byExclusion } = this;