mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
added i18n.properties and allow anonymous session
This commit is contained in:
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.client.ScmClient;
|
||||
import sonia.scm.client.ScmClientSession;
|
||||
import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -167,7 +168,18 @@ public class App
|
||||
*/
|
||||
private ScmClientSession createSession()
|
||||
{
|
||||
return ScmClient.createSession(serverUrl, username, password);
|
||||
ScmClientSession session = null;
|
||||
|
||||
if (Util.isNotEmpty(username) && Util.isNotEmpty(password))
|
||||
{
|
||||
session = ScmClient.createSession(serverUrl, username, password);
|
||||
}
|
||||
else
|
||||
{
|
||||
session = ScmClient.createSession(serverUrl);
|
||||
}
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user