@resolveio/client-lib-core 0.0.9 → 0.0.11

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.
@@ -1123,7 +1123,7 @@ class SocketManagerService {
1123
1123
  this._socket.onmessage = (event) => {
1124
1124
  let resData = JSON.parse(event.data, dateReviver);
1125
1125
  if (resData.data === 'reloadWSCommand') {
1126
- window.location.href = window.location.href;
1126
+ window.location.href = window.location.href + '?forceReload=true';
1127
1127
  }
1128
1128
  else if (resData.data === 'reconnectWSCommand') {
1129
1129
  this._socket.reconnect();
@@ -1611,16 +1611,19 @@ class AccountManagerService {
1611
1611
  if (this.isUserSuperAdmin()) {
1612
1612
  return true;
1613
1613
  }
1614
- this.user.getValue().roles.groups.forEach(group => {
1615
- if (group.views.filter(a => a.startsWith(view)).length) {
1614
+ let user = this.user.getValue();
1615
+ if (user) {
1616
+ user.roles.groups.forEach(group => {
1617
+ if (group.views.filter(a => a.startsWith(view)).length) {
1618
+ res = true;
1619
+ }
1620
+ });
1621
+ if (user.roles.miscs.filter(a => a.startsWith(view)).length) {
1622
+ res = true;
1623
+ }
1624
+ if (user.roles.groups.filter(a => a.name === view).length) {
1616
1625
  res = true;
1617
1626
  }
1618
- });
1619
- if (this.user.getValue().roles.miscs.filter(a => a.startsWith(view)).length) {
1620
- res = true;
1621
- }
1622
- if (this.user.getValue().roles.groups.filter(a => a.name === view).length) {
1623
- res = true;
1624
1627
  }
1625
1628
  return res;
1626
1629
  }