Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
fix(permission): add permission cache empty check
Browse files Browse the repository at this point in the history
close #1231
  • Loading branch information
batamar committed Aug 30, 2019
1 parent 1c4138d commit cb74519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/permissions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const getUserAllowedActions = async (user: IUserDocument): Promise<IActio

let actionMap: IActionMap;

if (permissionCache) {
if (permissionCache && permissionCache !== '{}') {
actionMap = JSON.parse(permissionCache);
} else {
actionMap = await userAllowedActions(user);
Expand Down

0 comments on commit cb74519

Please sign in to comment.