return createUser(username, password.toCharArray(), read, write, admin);
}
public boolean createUser(String username, char[] password, boolean read, boolean write, boolean admin)
{
if (_principalDatabase.createPrincipal(new UsernamePrincipal(username), password))
{
if (!setRights(username, read, write, admin))
{
//unable to set rights for user, remove account
try
{
_principalDatabase.deletePrincipal(new UsernamePrincipal(username));
}
catch (AccountNotFoundException e)
{
//ignore
}