parent
4572179aac
commit
a00f92d9af
|
|
@ -15,7 +15,7 @@ import org.eclipse.che.api.workspace.server.spi.InfrastructureException;
|
|||
import org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure;
|
||||
|
||||
/**
|
||||
* An exception thrown by {@link RuntimeInfrastructure} and related components. Indicates that an
|
||||
* An exception thrown by {@link RuntimeInfrastructure} and related components. Indicates that a
|
||||
* user is not authorized to use Che.
|
||||
*
|
||||
* @author Anatolii Bazko
|
||||
|
|
|
|||
|
|
@ -585,15 +585,15 @@ public class KubernetesNamespaceFactory {
|
|||
}
|
||||
}
|
||||
|
||||
protected void validateAuthorization(String namespaceName, String userName)
|
||||
protected void validateAuthorization(String namespaceName, String username)
|
||||
throws InfrastructureException {
|
||||
if (!authorizationChecker.isAuthorized(userName)) {
|
||||
if (!authorizationChecker.isAuthorized(username)) {
|
||||
try {
|
||||
permissionsCleaner.cleanUp(namespaceName);
|
||||
} catch (InfrastructureException | KubernetesClientException e) {
|
||||
LOG.error(
|
||||
"Failed to clean up permissions for user '{}' in namespace '{}'. Cause: {}",
|
||||
userName,
|
||||
username,
|
||||
namespaceName,
|
||||
e.getMessage(),
|
||||
e);
|
||||
|
|
@ -602,7 +602,7 @@ public class KubernetesNamespaceFactory {
|
|||
throw new AuthorizationException(
|
||||
format(
|
||||
"User '%s' is not authorized to create a project. Please contact your system administrator.",
|
||||
userName));
|
||||
username));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue