fixed bug on add administrators

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@98764 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-07-17 15:07:58 +00:00
parent 1225585ec6
commit 0e0609f4e4
2 changed files with 19 additions and 13 deletions

View File

@ -2798,7 +2798,11 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
List<ExtendedWorkspaceACL> listEACL = new ArrayList<ExtendedWorkspaceACL>(listACL.size()); List<ExtendedWorkspaceACL> listEACL = new ArrayList<ExtendedWorkspaceACL>(listACL.size());
for (WorkspaceACL workspaceACL : listACL) { for (WorkspaceACL workspaceACL : listACL) {
listEACL.add(new ExtendedWorkspaceACL(workspaceACL.getId(), workspaceACL.getLabel(), workspaceACL.getDefaultValue(), workspaceACL.getUserType(), workspaceACL.getDescription(), wsFolder.getOwner().getPortalLogin(), folderId));
boolean isBaseSharedFolder = (wsFolder.getId().compareTo(folderId)==0)?true:false;
ExtendedWorkspaceACL eac = new ExtendedWorkspaceACL(workspaceACL.getId(), workspaceACL.getLabel(), workspaceACL.getDefaultValue(), workspaceACL.getUserType(), workspaceACL.getDescription(), wsFolder.getOwner().getPortalLogin(), folderId, isBaseSharedFolder);
workspaceLogger.trace("ACL "+workspaceACL+" converted in: "+eac);
listEACL.add(eac);
} }
return listEACL; return listEACL;

View File

@ -17,6 +17,9 @@ public class ExtendedWorkspaceACL extends WorkspaceACL{
private String loginOwner; private String loginOwner;
private String workspaceItemId; private String workspaceItemId;
private boolean isBaseSharedFolder;
/** /**
* *
*/ */
@ -32,10 +35,11 @@ public class ExtendedWorkspaceACL extends WorkspaceACL{
* @param loginOwner * @param loginOwner
* @param workspaceItemId * @param workspaceItemId
*/ */
public ExtendedWorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description, String loginOwner, String workspaceItemId) { public ExtendedWorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description, String loginOwner, String workspaceItemId, boolean isBaseSharedFolder) {
super(id, label, defaultValue, userType, description); super(id, label, defaultValue, userType, description);
this.loginOwner = loginOwner; this.loginOwner = loginOwner;
this.workspaceItemId = workspaceItemId; this.workspaceItemId = workspaceItemId;
this.isBaseSharedFolder = isBaseSharedFolder;
} }
@ -57,6 +61,13 @@ public class ExtendedWorkspaceACL extends WorkspaceACL{
this.workspaceItemId = workspaceItemId; this.workspaceItemId = workspaceItemId;
} }
public boolean isBaseSharedFolder() {
return isBaseSharedFolder;
}
public void setBaseSharedFolder(boolean isBaseSharedFolder) {
this.isBaseSharedFolder = isBaseSharedFolder;
}
@Override @Override
public String toString() { public String toString() {
@ -65,18 +76,9 @@ public class ExtendedWorkspaceACL extends WorkspaceACL{
builder.append(loginOwner); builder.append(loginOwner);
builder.append(", workspaceItemId="); builder.append(", workspaceItemId=");
builder.append(workspaceItemId); builder.append(workspaceItemId);
builder.append(", getId()="); builder.append(", isBaseSharedFolder=");
builder.append(getId()); builder.append(isBaseSharedFolder);
builder.append(", getLabel()=");
builder.append(getLabel());
builder.append(", getDefaultValue()=");
builder.append(getDefaultValue());
builder.append(", getUserType()=");
builder.append(getUserType());
builder.append(", getDescription()=");
builder.append(getDescription());
builder.append("]"); builder.append("]");
return builder.toString(); return builder.toString();
} }
} }