Trivial fix, to avoid NPE if tenant admin console is accessed in a ST environment

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6826 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-19 13:37:27 +00:00
parent 6e1e59e951
commit 30e7b62d4a

View File

@@ -155,7 +155,7 @@ public class TenantAdminConsoleBean
*/ */
public String getCurrentUserName() public String getCurrentUserName()
{ {
return tenantInterpreter.getCurrentUserName(); return (tenantInterpreter != null) ? tenantInterpreter.getCurrentUserName() : null;
} }
/** /**
@@ -168,7 +168,7 @@ public class TenantAdminConsoleBean
try try
{ {
long startms = System.currentTimeMillis(); long startms = System.currentTimeMillis();
String result = tenantInterpreter.interpretCommand(command); String result = (tenantInterpreter != null) ? tenantInterpreter.interpretCommand(command) : "Tenant AdminConsole is not available - check that multi-tenancy is enabled !";
setDuration(System.currentTimeMillis() - startms); setDuration(System.currentTimeMillis() - startms);
setResult(result); setResult(result);
setCommand(""); setCommand("");