authscape 1.0.560 → 1.0.564
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 +1 -4
- package/package.json +1 -1
- package/src/components/AuthScapeApp.js +1 -3
package/index.js
CHANGED
|
@@ -351,9 +351,6 @@ function AuthScapeApp(_ref) {
|
|
|
351
351
|
};
|
|
352
352
|
var GetSignedInUser = function GetSignedInUser() {
|
|
353
353
|
var signedInUser = signedInUser.current;
|
|
354
|
-
|
|
355
|
-
// create the prototype for reading role and permission
|
|
356
|
-
|
|
357
354
|
signedInUser.HasRole = function (name) {
|
|
358
355
|
if (currentUser.roles.find(function (r) {
|
|
359
356
|
return r.name === name;
|
|
@@ -364,7 +361,7 @@ function AuthScapeApp(_ref) {
|
|
|
364
361
|
}
|
|
365
362
|
};
|
|
366
363
|
signedInUser.HasPermission = function (name) {
|
|
367
|
-
if (currentUser.
|
|
364
|
+
if (currentUser.permissions.find(function (r) {
|
|
368
365
|
return r === name;
|
|
369
366
|
}) != null) {
|
|
370
367
|
return true;
|
package/package.json
CHANGED
|
@@ -339,8 +339,6 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
339
339
|
|
|
340
340
|
let signedInUser = signedInUser.current;
|
|
341
341
|
|
|
342
|
-
// create the prototype for reading role and permission
|
|
343
|
-
|
|
344
342
|
signedInUser.HasRole = function(name) {
|
|
345
343
|
|
|
346
344
|
if (currentUser.roles.find(r => r.name === name) != null)
|
|
@@ -356,7 +354,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
356
354
|
|
|
357
355
|
signedInUser.HasPermission = function(name) {
|
|
358
356
|
|
|
359
|
-
if (currentUser.
|
|
357
|
+
if (currentUser.permissions.find(r => r === name) != null)
|
|
360
358
|
{
|
|
361
359
|
return true;
|
|
362
360
|
}
|