Francesco Mangiacrapa 2018-05-23 14:45:03 +00:00
parent 7e06739d8c
commit a34ae883a9
1 changed files with 6 additions and 4 deletions

View File

@ -1959,8 +1959,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
try {
checkItemLocked(folder.getIdentifier());
Workspace workspace = getWorkspace();
workspaceLogger.info("shareFolder "+ folder.getIdentifier()
@ -1970,7 +1968,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
+" ACL: "+acl);
//DEBUG
printContacts(listContacts);
//printContacts(listContacts);
List<String> listLogin = UserUtil.getListLoginByInfoContactModel(listContacts);
WorkspaceSharedFolder sharedFolder = null;
@ -1999,6 +1997,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
}
}
else{
//IS NEW SHARED FOLDER
FileModel parent = folder.getParentFileModel();
String parentId = "";
if(parent!=null){
@ -2007,6 +2006,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspaceLogger.info("Parent is null, reading root ID from workspace");
parentId = getWorkspace().getRoot().getId();
}
//CHECKING THAT THE PARENT IS NOT LOCKED
checkItemLocked(parentId);
sharedFolder = workspace.createSharedFolder(folder.getName(), folder.getDescription(), listLogin, parentId);
}
}
@ -2048,7 +2051,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
} catch (Exception e) {
workspaceLogger.error("Error in shareFolder ", e);
e.printStackTrace();
String error = ConstantsExplorer.SERVER_ERROR+" creating shared folder.";
throw new Exception(error);
}