diff --git a/source/java/org/alfresco/web/bean/LoginBean.java b/source/java/org/alfresco/web/bean/LoginBean.java index 0874477dd9..fd37eca781 100644 --- a/source/java/org/alfresco/web/bean/LoginBean.java +++ b/source/java/org/alfresco/web/bean/LoginBean.java @@ -288,7 +288,7 @@ public class LoginBean implements Serializable NodeRef homeSpaceRef = (NodeRef) this.getNodeService().getProperty(getPersonService().getPerson(this.username), ContentModel.PROP_HOMEFOLDER); // check that the home space node exists - else user cannot login - if (this.getNodeService().exists(homeSpaceRef) == false) + if (homeSpaceRef == null || this.getNodeService().exists(homeSpaceRef) == false) { throw new InvalidNodeRefException(homeSpaceRef); } @@ -353,8 +353,17 @@ public class LoginBean implements Serializable } catch (InvalidNodeRefException refErr) { + String msg; + if (refErr.getNodeRef() != null) + { + msg = refErr.getNodeRef().toString(); + } + else + { + msg = Application.getMessage(fc, MSG_NONE); + } Utils.addErrorMessage(MessageFormat.format(Application.getMessage(fc, - Repository.ERROR_NOHOME), refErr.getNodeRef().getId())); + Repository.ERROR_NOHOME), msg)); } } else @@ -425,6 +434,7 @@ public class LoginBean implements Serializable private static final String MSG_ERROR_UNKNOWN_USER = "error_login_user"; private static final String MSG_ERROR_LOGIN_DISALLOWED = "error_login_disallowed"; private static final String MSG_ERROR_LOGIN_MAXUSERS = "error_login_maxusers"; + private static final String MSG_NONE = "none"; public static final String MSG_USERNAME_LENGTH = "login_err_username_length"; public static final String MSG_PASSWORD_LENGTH = "login_err_password_length"; diff --git a/source/java/org/alfresco/web/bean/users/EditUserWizard.java b/source/java/org/alfresco/web/bean/users/EditUserWizard.java index 05c882185f..b01806e2de 100644 --- a/source/java/org/alfresco/web/bean/users/EditUserWizard.java +++ b/source/java/org/alfresco/web/bean/users/EditUserWizard.java @@ -94,7 +94,7 @@ public class EditUserWizard extends CreateUserWizard // calculate home space name and parent space Id from homeFolderId this.homeSpaceLocation = null; // default to Company root space NodeRef homeFolderRef = (NodeRef) props.get("homeFolder"); - if (this.getNodeService().exists(homeFolderRef) == true) + if (homeFolderRef != null && this.getNodeService().exists(homeFolderRef) == true) { ChildAssociationRef childAssocRef = this.getNodeService().getPrimaryParent(homeFolderRef); NodeRef parentRef = childAssocRef.getParentRef(); diff --git a/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentServers.java b/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentServers.java index a6b3a6ed82..72b1a30cda 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentServers.java +++ b/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentServers.java @@ -375,8 +375,7 @@ public class UIDeploymentServers extends UIInput out.write(""); out.write("
"); - if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType()) || - (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType()))) + if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType())) { out.write(""); - - // MER START - if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType() ) || - (server != null && WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType()))) + if (!edit && WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType() ) || + (edit && WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType()))) { // for an FSR create the protocol adapter field out.write(""); } - // MER END // create the server host field out.write("
"); @@ -677,10 +676,8 @@ public class UIDeploymentServers extends UIInput Utils.encodeRecursive(context, group); out.write("
"); @@ -724,7 +721,6 @@ public class UIDeploymentServers extends UIInput out.write("
");