git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@176696 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
042ecafe50
commit
29f8a0d30e
|
@ -105,6 +105,14 @@ public class WorkspaceManager {
|
|||
try{
|
||||
long start = System.currentTimeMillis();
|
||||
ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context));
|
||||
|
||||
//TODO: remove it when users will be created via storageHub
|
||||
String user = AuthorizationProvider.instance.get().getClient().getId();
|
||||
org.gcube.common.storagehub.model.Path trashPath = Paths.append(Utils.getWorkspacePath(), Constants.TRASH_ROOT_FOLDER_NAME);
|
||||
if (!ses.nodeExists(trashPath.toPath())) {
|
||||
Utils.createFolderInternally(ses, ses.getNode(Utils.getWorkspacePath().toPath()) , Constants.TRASH_ROOT_FOLDER_NAME, "trash of "+user, false, user, null);
|
||||
}
|
||||
|
||||
log.trace("time to connect to repo {}",(System.currentTimeMillis()-start));
|
||||
Node node = ses.getNode(absolutePath.toPath());
|
||||
authChecker.checkReadAuthorizationControl(ses, node.getIdentifier());
|
||||
|
@ -215,10 +223,6 @@ public class WorkspaceManager {
|
|||
ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context));
|
||||
log.info("time to connect to repo {}",(System.currentTimeMillis()-start));
|
||||
|
||||
if (!ses.nodeExists(trashPath.toPath())) {
|
||||
Utils.createFolderInternally(ses, ses.getNode(Utils.getWorkspacePath().toPath()) , Constants.TRASH_ROOT_FOLDER_NAME, "trash of "+user, false, user, null);
|
||||
}
|
||||
|
||||
Node folder = ses.getNode(trashPath.toPath());
|
||||
item = node2Item.getItem(folder, excludes);
|
||||
}catch(RepositoryException re ){
|
||||
|
|
Loading…
Reference in New Issue