authscape 1.0.570 → 1.0.572
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 +2 -2
- package/package.json +1 -1
- package/src/components/AuthScapeApp.js +2 -2
package/index.js
CHANGED
|
@@ -353,7 +353,7 @@ function AuthScapeApp(_ref) {
|
|
|
353
353
|
if (signedInUser != null) {
|
|
354
354
|
var _signedInUser = signedInUser.current;
|
|
355
355
|
if (_signedInUser != null) {
|
|
356
|
-
_signedInUser.
|
|
356
|
+
_signedInUser.hasRole = function (name) {
|
|
357
357
|
if (_signedInUser.roles != null) {
|
|
358
358
|
if (_signedInUser.roles.find(function (r) {
|
|
359
359
|
return r.name === name;
|
|
@@ -364,7 +364,7 @@ function AuthScapeApp(_ref) {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
|
-
_signedInUser.
|
|
367
|
+
_signedInUser.hasPermission = function (name) {
|
|
368
368
|
if (_signedInUser.permissions != null) {
|
|
369
369
|
if (_signedInUser.permissions.find(function (r) {
|
|
370
370
|
return r === name;
|
package/package.json
CHANGED
|
@@ -343,7 +343,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
343
343
|
|
|
344
344
|
if (_signedInUser != null)
|
|
345
345
|
{
|
|
346
|
-
_signedInUser.
|
|
346
|
+
_signedInUser.hasRole = function(name) {
|
|
347
347
|
|
|
348
348
|
if (_signedInUser.roles != null)
|
|
349
349
|
{
|
|
@@ -358,7 +358,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
_signedInUser.
|
|
361
|
+
_signedInUser.hasPermission = function(name) {
|
|
362
362
|
|
|
363
363
|
if (_signedInUser.permissions != null)
|
|
364
364
|
{
|