Fixing the issue: https://support.d4science.org/issues/11824#note-4
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@167709 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7e06739d8c
commit
a34ae883a9
|
@ -1959,8 +1959,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
checkItemLocked(folder.getIdentifier());
|
|
||||||
|
|
||||||
Workspace workspace = getWorkspace();
|
Workspace workspace = getWorkspace();
|
||||||
|
|
||||||
workspaceLogger.info("shareFolder "+ folder.getIdentifier()
|
workspaceLogger.info("shareFolder "+ folder.getIdentifier()
|
||||||
|
@ -1970,7 +1968,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
+" ACL: "+acl);
|
+" ACL: "+acl);
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
printContacts(listContacts);
|
//printContacts(listContacts);
|
||||||
|
|
||||||
List<String> listLogin = UserUtil.getListLoginByInfoContactModel(listContacts);
|
List<String> listLogin = UserUtil.getListLoginByInfoContactModel(listContacts);
|
||||||
WorkspaceSharedFolder sharedFolder = null;
|
WorkspaceSharedFolder sharedFolder = null;
|
||||||
|
@ -1999,6 +1997,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
//IS NEW SHARED FOLDER
|
||||||
FileModel parent = folder.getParentFileModel();
|
FileModel parent = folder.getParentFileModel();
|
||||||
String parentId = "";
|
String parentId = "";
|
||||||
if(parent!=null){
|
if(parent!=null){
|
||||||
|
@ -2007,6 +2006,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
workspaceLogger.info("Parent is null, reading root ID from workspace");
|
workspaceLogger.info("Parent is null, reading root ID from workspace");
|
||||||
parentId = getWorkspace().getRoot().getId();
|
parentId = getWorkspace().getRoot().getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CHECKING THAT THE PARENT IS NOT LOCKED
|
||||||
|
checkItemLocked(parentId);
|
||||||
|
|
||||||
sharedFolder = workspace.createSharedFolder(folder.getName(), folder.getDescription(), listLogin, parentId);
|
sharedFolder = workspace.createSharedFolder(folder.getName(), folder.getDescription(), listLogin, parentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2048,7 +2051,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
workspaceLogger.error("Error in shareFolder ", e);
|
workspaceLogger.error("Error in shareFolder ", e);
|
||||||
e.printStackTrace();
|
|
||||||
String error = ConstantsExplorer.SERVER_ERROR+" creating shared folder.";
|
String error = ConstantsExplorer.SERVER_ERROR+" creating shared folder.";
|
||||||
throw new Exception(error);
|
throw new Exception(error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue