Skip to content

Commit

Permalink
Merge pull request #275 from shanmukhdutt/dxp-254
Browse files Browse the repository at this point in the history
Fixed: permission issue when defining a base permission for app
  • Loading branch information
ravilodhi committed Mar 15, 2024
2 parents 9c1d229 + 65e7144 commit 6b8cf6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const actions: ActionTree<UserState, RootState> = {
if (permissionId) {
// As the token is not yet set in the state passing token headers explicitly
// TODO Abstract this out, how token is handled should be part of the method not the callee
const hasPermission = appPermissions.some((appPermissionId: any) => appPermissionId === permissionId );
const hasPermission = appPermissions.some((appPermission: any) => appPermission.action === permissionId );
// If there are any errors or permission check fails do not allow user to login
if (hasPermission) {
if (!hasPermission) {
const permissionError = 'You do not have permission to access the app.';
showToast(translate(permissionError));
console.error("error", permissionError);
Expand Down

0 comments on commit 6b8cf6c

Please sign in to comment.