diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelPermission.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelPermission.java index 39f27c1..970a051 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelPermission.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelPermission.java @@ -5,6 +5,9 @@ import java.util.List; import org.gcube.portlets.user.workspace.shared.WorkspaceACL; import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE; +import com.extjs.gxt.ui.client.event.BaseEvent; +import com.extjs.gxt.ui.client.event.Events; +import com.extjs.gxt.ui.client.event.Listener; import com.extjs.gxt.ui.client.widget.LayoutContainer; import com.extjs.gxt.ui.client.widget.form.Radio; import com.extjs.gxt.ui.client.widget.form.RadioGroup; @@ -43,7 +46,7 @@ public class PanelPermission extends LayoutContainer { radio.setBoxLabel(acl.getLabel()); radio.setValueAttribute(acl.getLabel()); radio.setData(WORKSPACEACL, acl); - radio.setToolTip(new ToolTipConfig(acl.getLabel())); + radio.setToolTip(new ToolTipConfig(acl.getDescription())); radio.setValue(acl.getDefaultValue()); return radio; diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/UserStore.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/UserStore.java index 60fa075..949d3a6 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/UserStore.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/UserStore.java @@ -17,7 +17,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback; */ public class UserStore implements ContactFetcher{ - public List listAllContact = new ArrayList(); + public static List listAllContact = null; // public boolean syncronizeCleanSharedUser = false; diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceServiceImpl.java b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceServiceImpl.java index 1272e3d..b57196f 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceServiceImpl.java @@ -2505,21 +2505,21 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT switch (acl) { case ADMINISTRATOR: - acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.ADMINISTRATOR)); + acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.ADMINISTRATOR,"")); break; case READ_ONLY: - acls.add(new WorkspaceACL(acl.toString(), "Read Only", false, USER_TYPE.OTHER)); + acls.add(new WorkspaceACL(acl.toString(), "Read Only", false, USER_TYPE.OTHER, "Users can read any file but cannot update/delete")); break; case WRITE_OWNER: - acls.add(new WorkspaceACL(acl.toString(), "Write Owner", true, USER_TYPE.OTHER)); + acls.add(new WorkspaceACL(acl.toString(), "Write Own", true, USER_TYPE.OTHER, "Users can update/delete only their files")); break; case WRITE_ALL: - acls.add(new WorkspaceACL(acl.toString(), "Write All", false, USER_TYPE.OTHER)); + acls.add(new WorkspaceACL(acl.toString(), "Write Any", false, USER_TYPE.OTHER,"Any user can update/delete any file")); break; default: - acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.OTHER)); + acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.OTHER, "")); break; } } diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/util/WsUtil.java b/src/main/java/org/gcube/portlets/user/workspace/server/util/WsUtil.java index dac3ead..f15b561 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/util/WsUtil.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/util/WsUtil.java @@ -74,10 +74,10 @@ public class WsUtil { /*USE ANOTHER ACCOUNT (OTHERWHISE BY TEST_USER) FOR RUNNING * COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/ -// user=TEST_USER; + user=TEST_USER; //UNCOMMENT THIS IN DEVELOP ENVIROMENT - user = "francesco.mangiacrapa"; +// user = "francesco.mangiacrapa"; logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:"); logger.warn("session id: "+sessionID); @@ -103,6 +103,9 @@ public class WsUtil { }else if(user.compareToIgnoreCase(TEST_USER)==0){ withoutPortal = true; + }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){ + + withoutPortal = true; }else{ diff --git a/src/main/java/org/gcube/portlets/user/workspace/shared/WorkspaceACL.java b/src/main/java/org/gcube/portlets/user/workspace/shared/WorkspaceACL.java index f97ea9e..5ef4b7b 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/shared/WorkspaceACL.java +++ b/src/main/java/org/gcube/portlets/user/workspace/shared/WorkspaceACL.java @@ -18,15 +18,18 @@ public class WorkspaceACL implements Serializable{ private String label; private boolean defaultValue; private USER_TYPE userType; + + private String description; public enum USER_TYPE{ADMINISTRATOR, GROUP, OWNER, OTHER}; - public WorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType) { + public WorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description) { super(); this.id = id; this.label = label; this.defaultValue = defaultValue; this.userType = userType; + this.description = description; } @@ -68,7 +71,14 @@ public class WorkspaceACL implements Serializable{ } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + @Override public String toString() { StringBuilder builder = new StringBuilder(); @@ -80,7 +90,12 @@ public class WorkspaceACL implements Serializable{ builder.append(defaultValue); builder.append(", userType="); builder.append(userType); + builder.append(", description="); + builder.append(description); builder.append("]"); return builder.toString(); } + + + }