We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 527db0f commit 406a25cCopy full SHA for 406a25c
src/middleware.ts
@@ -34,8 +34,8 @@ export const authorize = (options: MiddlewareOptions) => {
34
}
35
})
36
37
- const hasWarrant = await vm.$warrant.hasWarrant({ op, warrants: warrantsToCheck });
38
- if (!hasWarrant) {
+ const isAuthorized = await vm.$warrant.checkMany({ op, warrants: warrantsToCheck });
+ if (!isAuthorized) {
39
next({ path: redirectTo });
40
} else {
41
next();
0 commit comments