File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ const actions: ActionTree<UserState, RootState> = {
41
41
if ( permissionId ) {
42
42
// As the token is not yet set in the state passing token headers explicitly
43
43
// 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 ) ;
45
45
// If there are any errors or permission check fails do not allow user to login
46
- if ( hasPermission ) {
46
+ if ( ! hasPermission ) {
47
47
const permissionError = 'You do not have permission to access the app.' ;
48
48
showToast ( translate ( permissionError ) ) ;
49
49
logger . error ( "error" , permissionError ) ;
You can’t perform that action at this time.
0 commit comments