From 0467028da052723d106b7c10002427f83b9ec886 Mon Sep 17 00:00:00 2001 From: jonnalah Date: Fri, 29 May 2015 11:07:37 -0400 Subject: [PATCH] Collaboration group bug fix and modified the caNanolab_deploy cli script to ensure clean deploy --- software/cananolab-webapp/caNanoLab_deploy.cli | 9 +++++++-- .../nci/cananolab/dto/common/CollaborationGroupBean.java | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/software/cananolab-webapp/caNanoLab_deploy.cli b/software/cananolab-webapp/caNanoLab_deploy.cli index c8eeac5891..88dacee8a8 100644 --- a/software/cananolab-webapp/caNanoLab_deploy.cli +++ b/software/cananolab-webapp/caNanoLab_deploy.cli @@ -7,6 +7,11 @@ connect localhost:19990 # Deploy War Files ############################################################## +if (outcome ==success) of /deployment=caNanoLab.war:read-resource +undeploy caNanoLab.war +end-if +if (outcome ==success) of /deployment=uptEAR.ear:read-resource +undeploy uptEAR.ear +end-if deploy --force /local/content/caNanoLab/artifacts/caNanoLab.war -deploy --force /local/content/caNanoLab/artifacts/uptEAR.ear - +deploy --force /local/content/caNanoLab/artifacts/uptEAR.ear \ No newline at end of file diff --git a/software/cananolab-webapp/src/gov/nih/nci/cananolab/dto/common/CollaborationGroupBean.java b/software/cananolab-webapp/src/gov/nih/nci/cananolab/dto/common/CollaborationGroupBean.java index 725f3eb52b..20e4330251 100644 --- a/software/cananolab-webapp/src/gov/nih/nci/cananolab/dto/common/CollaborationGroupBean.java +++ b/software/cananolab-webapp/src/gov/nih/nci/cananolab/dto/common/CollaborationGroupBean.java @@ -60,7 +60,9 @@ public void setDescription(String description) { public void addUserAccess(AccessibilityBean userAccess) { for(int i = 0 ; i < this.getUserAccesses().size() ; i++){ - if(this.getUserAccesses().get(i).getUserBean().getUserId().equals(userAccess.getUserBean().getUserId())){ + if((userAccess.getUserBean().getUserId()!=null)&&(this.getUserAccesses().get(i).getUserBean().getUserId().equals(userAccess.getUserBean().getUserId()))){ + this.getUserAccesses().remove(i); + }else if(this.getUserAccesses().get(i).getUserBean().getDisplayName().equalsIgnoreCase(userAccess.getUserBean().getDisplayName())){ this.getUserAccesses().remove(i); } }