mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-04 12:49:39 +02:00
fix scope check
This commit is contained in:
@@ -153,7 +153,7 @@ public final class JwtAccessTokenBuilder implements AccessTokenBuilder {
|
||||
@Override
|
||||
public JwtAccessToken build() {
|
||||
final Scope principalScope = SecurityUtils.getSubject().getPrincipals().oneByType(Scope.class);
|
||||
if (principalScope != null) {
|
||||
if (principalScope != null && !principalScope.isEmpty()) {
|
||||
if (scope != null && !scope.isEmpty()) {
|
||||
throw new AuthorizationException(String.format("cannot merge builder scope (%s) with principal scope (%s)", scope, principalScope));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user