do not hide password

This commit is contained in:
Peter Hormanns 2020-03-17 15:10:20 +01:00
parent 7bfbf0b8c0
commit e06cb3dffb
2 changed files with 5 additions and 3 deletions

View File

@ -53,7 +53,8 @@ public class MailboxDAO {
whereParamsMap.put("name", pac + "-" + localpart); whereParamsMap.put("name", pac + "-" + localpart);
final Object[] rpcResult = (Object[])rpcClient.execute("user.search", xmlRpcParamsList); final Object[] rpcResult = (Object[])rpcClient.execute("user.search", xmlRpcParamsList);
if (rpcResult.length == 1) { if (rpcResult.length == 1) {
Map<String, Object> userAsMap = (Map<String, Object>) rpcResult[0]; @SuppressWarnings("unchecked")
final Map<String, Object> userAsMap = (Map<String, Object>) rpcResult[0];
return (String) userAsMap.get("name"); return (String) userAsMap.get("name");
} }
throw new MailboxNotFound(); throw new MailboxNotFound();
@ -68,6 +69,7 @@ public class MailboxDAO {
setParamsMap.put("name", pac + "-" + localpart); setParamsMap.put("name", pac + "-" + localpart);
setParamsMap.put("password", pwGen()); setParamsMap.put("password", pwGen());
setParamsMap.put("comment", comment); setParamsMap.put("comment", comment);
@SuppressWarnings("unused")
final Object rpcResult = rpcClient.execute("user.add", xmlRpcParamsList); final Object rpcResult = rpcClient.execute("user.add", xmlRpcParamsList);
} }

View File

@ -65,9 +65,9 @@ public class DirectoryServiceRunner {
final DirectoryService directoryService = factory.getDirectoryService(); final DirectoryService directoryService = factory.getDirectoryService();
directoryService.setShutdownHookEnabled(true); directoryService.setShutdownHookEnabled(true);
directoryService.getChangeLog().setEnabled(false); directoryService.getChangeLog().setEnabled(false);
directoryService.setAccessControlEnabled(true);
directoryService.setAllowAnonymousAccess(false); directoryService.setAllowAnonymousAccess(false);
directoryService.setPasswordHidden(true); directoryService.setAccessControlEnabled(true);
directoryService.setPasswordHidden(false);
return directoryService; return directoryService;
} }