Skip to content

Commit

Permalink
Fix an authorize claim return
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmendelope committed Dec 1, 2023
1 parent c91486b commit 20f8575
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/njwt/claims.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ func (ac *AuthxClaim) IsAuthorized(accountName string, adminRoleRequired bool) b
if account.Name == accountName {
if adminRoleRequired {
authorized = account.Role == "Admin"
} else {
authorized = true
}
return authorized
}
Expand Down

0 comments on commit 20f8575

Please sign in to comment.