authscape 1.0.568 → 1.0.570

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/index.js CHANGED
@@ -354,8 +354,8 @@ function AuthScapeApp(_ref) {
354
354
  var _signedInUser = signedInUser.current;
355
355
  if (_signedInUser != null) {
356
356
  _signedInUser.HasRole = function (name) {
357
- if (currentUser.roles != null) {
358
- if (currentUser.roles.find(function (r) {
357
+ if (_signedInUser.roles != null) {
358
+ if (_signedInUser.roles.find(function (r) {
359
359
  return r.name === name;
360
360
  }) != null) {
361
361
  return true;
@@ -365,8 +365,8 @@ function AuthScapeApp(_ref) {
365
365
  }
366
366
  };
367
367
  _signedInUser.HasPermission = function (name) {
368
- if (currentUser.permissions != null) {
369
- if (currentUser.permissions.find(function (r) {
368
+ if (_signedInUser.permissions != null) {
369
+ if (_signedInUser.permissions.find(function (r) {
370
370
  return r === name;
371
371
  }) != null) {
372
372
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.568",
3
+ "version": "1.0.570",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -345,9 +345,9 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
345
345
  {
346
346
  _signedInUser.HasRole = function(name) {
347
347
 
348
- if (currentUser.roles != null)
348
+ if (_signedInUser.roles != null)
349
349
  {
350
- if (currentUser.roles.find(r => r.name === name) != null)
350
+ if (_signedInUser.roles.find(r => r.name === name) != null)
351
351
  {
352
352
  return true;
353
353
  }
@@ -360,9 +360,9 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
360
360
 
361
361
  _signedInUser.HasPermission = function(name) {
362
362
 
363
- if (currentUser.permissions != null)
363
+ if (_signedInUser.permissions != null)
364
364
  {
365
- if (currentUser.permissions.find(r => r === name) != null)
365
+ if (_signedInUser.permissions.find(r => r === name) != null)
366
366
  {
367
367
  return true;
368
368
  }