Skip to content

Commit 65415d4

Browse files
authored
Merge pull request #666 from shanmukhdutt/dxp-254
Fixed: Permission issue when defining a base permission for app
2 parents 4d64c14 + c1165d1 commit 65415d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store/modules/user/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ const actions: ActionTree<UserState, RootState> = {
4141
if (permissionId) {
4242
// As the token is not yet set in the state passing token headers explicitly
4343
// TODO Abstract this out, how token is handled should be part of the method not the callee
44-
const hasPermission = appPermissions.some((appPermissionId: any) => appPermissionId === permissionId );
44+
const hasPermission = appPermissions.some((appPermission: any) => appPermission.action === permissionId );
4545
// If there are any errors or permission check fails do not allow user to login
46-
if (hasPermission) {
46+
if (!hasPermission) {
4747
const permissionError = 'You do not have permission to access the app.';
4848
showToast(translate(permissionError));
4949
logger.error("error", permissionError);

0 commit comments

Comments
 (0)