Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server and CLI use version from release and versionChecking constant and commit revision #4308

Merged
merged 13 commits into from
Jul 31, 2021
Prev Previous commit
Next Next commit
revert unnessary change
  • Loading branch information
longquanzheng committed Jul 31, 2021
commit 3af0615c97624eea2a5cba104ac70f22fb39ab4a
6 changes: 5 additions & 1 deletion common/authorization/oauthAuthorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ func (a *oauthAuthority) validatePermission(claims *jwtClaims, attributes *Attri
case PermissionWrite:
groups = data[common.DomainDataKeyForWriteGroups]
default:
return fmt.Errorf("token doesn't have permission for admin API")
if claims.Admin {
return nil
} else {
return fmt.Errorf("token doesn't have permission for admin API")
}
}
// groups are separated by space
jwtGroups := strings.Split(groups, groupSeparator)
Expand Down