mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-36: Do not automatically generate random passwords at the REST API level.
This commit is contained in:
@@ -21,11 +21,9 @@ package org.apache.guacamole.rest.user;
|
||||
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.google.inject.assistedinject.AssistedInject;
|
||||
import java.util.UUID;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.net.auth.User;
|
||||
import org.apache.guacamole.net.auth.Directory;
|
||||
import org.apache.guacamole.net.auth.UserContext;
|
||||
@@ -69,15 +67,4 @@ public class UserDirectoryResource extends DirectoryResource<User, APIUser> {
|
||||
super(userContext, directory, translator, resourceFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public APIUser createObject(APIUser object) throws GuacamoleException {
|
||||
|
||||
// Randomly set the password if it wasn't provided
|
||||
if (object.getPassword() == null)
|
||||
object.setPassword(UUID.randomUUID().toString());
|
||||
|
||||
return super.createObject(object);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user