mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-05 22:29:11 +01:00
Rename role -> permissionRole
This commit is contained in:
@@ -66,9 +66,9 @@ public class ApiKeyRealm extends AuthenticatingRealm {
|
||||
checkArgument(token instanceof BearerToken, "%s is required", BearerToken.class);
|
||||
BearerToken bt = (BearerToken) token;
|
||||
ApiKeyService.CheckResult check = apiKeyService.check(bt.getCredentials());
|
||||
RepositoryRole repositoryRole = repositoryRoleManager.get(check.getRole());
|
||||
RepositoryRole repositoryRole = repositoryRoleManager.get(check.getPermissionRole());
|
||||
if (repositoryRole == null) {
|
||||
throw new AuthorizationException("api key has unknown role: " + check.getRole());
|
||||
throw new AuthorizationException("api key has unknown role: " + check.getPermissionRole());
|
||||
}
|
||||
String scope = "repository:" + String.join(",", repositoryRole.getVerbs()) + ":*";
|
||||
return helper
|
||||
|
||||
Reference in New Issue
Block a user