This commit is contained in:
Francesco Mangiacrapa 2020-09-29 09:43:52 +02:00
parent 1175c4fb77
commit 96dab14983
3 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-tree-widget</artifactId> <artifactId>workspace-tree-widget</artifactId>
<version>6.31.0</version> <version>6.31.0-SNAPSHOT</version>
<name>gCube Workspace Tree Widget</name> <name>gCube Workspace Tree Widget</name>
<description> <description>
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace

View File

@ -307,13 +307,8 @@ public class DialogGetInfoBootstrap extends Composite {
htmlSetValue(txtMimeType, fileModel.getType()); htmlSetValue(txtMimeType, fileModel.getType());
txtAreaDescription.setResize(ResizeType.VERTICAL); txtAreaDescription.setResize(ResizeType.VERTICAL);
//load description
if (fileModel.isDirectory()) {
txtAreaDescription.setValue(fileModel.getDescription());
// add(txtAreaDescription);
} else
loadDescription(fileModel.getIdentifier()); loadDescription(fileModel.getIdentifier());
//owner //owner
htmlSetValue(txtOwner, fileModel.getOwnerFullName()); htmlSetValue(txtOwner, fileModel.getOwnerFullName());
//creation date //creation date
@ -329,14 +324,12 @@ public class DialogGetInfoBootstrap extends Composite {
}else { }else {
loadLastModificationDate(fileModel.getIdentifier()); loadLastModificationDate(fileModel.getIdentifier());
loadSize(fileModel.getIdentifier()); loadSize(fileModel.getIdentifier());
} }
htmlSetValue(txtShared, fileModel.isShared()+""); htmlSetValue(txtShared, fileModel.isShared()+"");
// USERS SHARED // USERS SHARED
if (fileModel.isShared()) { if (fileModel.isShared()) {
cgSharedWith.setVisible(true); cgSharedWith.setVisible(true);
loadACLsDescriptionForSharedFolder(fileModel.getIdentifier()); loadACLsDescriptionForSharedFolder(fileModel.getIdentifier());
} }
@ -545,6 +538,7 @@ public class DialogGetInfoBootstrap extends Composite {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
loadDescription(fileModel.getIdentifier());
new MessageBoxAlert("Error on updating description...", caught.getMessage(), null); new MessageBoxAlert("Error on updating description...", caught.getMessage(), null);
} }

View File

@ -3102,8 +3102,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
} catch (Exception e) { } catch (Exception e) {
workspaceLogger.error("Error on updating the description for item: " + itemId, e); workspaceLogger.error("Error on updating the description for item: " + itemId, e);
if(e.getMessage().toLowerCase().contains("insufficent privileges")) {
throw new Exception("You don't have permission to update this description");
}
String error = ConstantsExplorer.SERVER_ERROR + " updating the description for item with id: " String error = ConstantsExplorer.SERVER_ERROR + " updating the description for item with id: "
+ "" + itemId+". Error reported: "+e.getMessage(); + "" + itemId+". Error reported: "+e.getMessage();
throw new Exception(error); throw new Exception(error);
} }