Skip to content

Commit bb3c58f

Browse files
committed
fix: correct return values for login and authorization checks
1 parent 2372fbc commit bb3c58f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ export default class UserSoftDelete extends AdminForthPlugin {
3535
body:{
3636
allowedLogin: false,
3737
redirectTo: '/login',
38-
},
39-
ok: true
38+
}
4039
};
4140
if (adminUser.dbUser[this.options.activeFieldName] === false) {
4241
return rejectResult;
4342
}
43+
return { body: {allowedLogin: true} };
4444
}
4545
);
4646

@@ -55,6 +55,7 @@ export default class UserSoftDelete extends AdminForthPlugin {
5555
if (adminUser.dbUser[this.options.activeFieldName] === false) {
5656
return rejectResult;
5757
}
58+
return { allowed: true };
5859
}
5960
);
6061

0 commit comments

Comments
 (0)