Skip to content

Commit

Permalink
Merge pull request #244 from R-Sourabh/dxp-254
Browse files Browse the repository at this point in the history
Fixed: Permission issue when defining a base permission for app(dxp-254)
  • Loading branch information
ymaheshwari1 authored Mar 21, 2024
2 parents 20832b6 + e843df9 commit f85cfe6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
@@ -47,9 +47,8 @@ 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 );
// If there are any errors or permission check fails do not allow user to login
if (hasPermission) {
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) {
const permissionError = 'You do not have permission to access the app.';
showToast(translate(permissionError));
logger.error("error", permissionError);

0 comments on commit f85cfe6

Please sign in to comment.