Skip to content

Commit

Permalink
Merge pull request #357 from patricianapp/master
Browse files Browse the repository at this point in the history
Fix for @Authorized() requests with no specific permissions
  • Loading branch information
goldcaddy77 authored May 11, 2020
2 parents cc81747 + 41d29c3 commit 7149057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tgql/authChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const authChecker: AuthChecker<BaseContext> = ({ context: { user } }, per
}

// Just checking @Authorized() - return true since we know there is a user now
if (user.permissions.length === 0) {
if (permissions.length === 0) {
return user !== undefined;
}
// Check that permissions overlap
Expand Down

0 comments on commit 7149057

Please sign in to comment.