From 8156873a0bb76fd029937d1f259121942f6f6ca4 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Tue, 18 Feb 2014 16:15:20 +0000 Subject: [PATCH] added admin icon for ACL git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@91862 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/workspace/client/resources/Icons.java | 3 +++ .../workspace/client/resources/Resources.java | 5 +++++ .../workspace/client/resources/icons/admin.png | Bin 0 -> 1720 bytes .../client/util/GetPermissionIconByACL.java | 1 + .../view/sharing/PanelTogglePermission.java | 1 - .../workspace/server/GWTWorkspaceBuilder.java | 2 +- .../user/workspace/server/util/WsUtil.java | 2 +- 7 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/main/java/org/gcube/portlets/user/workspace/client/resources/icons/admin.png diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java index 6f29b96..996c6b1 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java @@ -301,5 +301,8 @@ public interface Icons extends ClientBundle { @Source("icons/vreShare.png") ImageResource vreFolder(); + + @Source("icons/admin.png") + ImageResource administrator(); } diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java index e04d3bc..3db27e7 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java @@ -80,6 +80,11 @@ public class Resources { return AbstractImagePrototype.create(ICONS.users()); } + public static AbstractImagePrototype getIconAdministrator(){ + + return AbstractImagePrototype.create(ICONS.administrator()); + } + public static AbstractImagePrototype getIconCut(){ return AbstractImagePrototype.create(ICONS.cut()); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/icons/admin.png b/src/main/java/org/gcube/portlets/user/workspace/client/resources/icons/admin.png new file mode 100644 index 0000000000000000000000000000000000000000..bcba7628b567e5f53fa9a5e2df3d7ab2b63bc44f GIT binary patch literal 1720 zcmW+%dr(t%7QP|mhR0=r4w77}h5ELzB>`JtVK>1_c@(IMTfkMgU_u;=z!oZL7jhFR zfhtzCEd)i#NVhPB3RW$TL6UIMg%}=g9T7#6fbv)@1W*!^oBP|?Kh8OGX3m`X&f`1h z>-|YF9&Q`mAPDk^i`{q7VSQhV3+&MSH*+E!##t1V7zIIX1EGvF^9~;^j7}{~&dV+= z%KS_SMG5k8_lCU<3e? zThpFYw{`mOKN33v|D!gU1L(v^2cMM7jCK$C6WjZ@hku{^nT5U6HkE+idkM{_ay-M)!Ltf2)v2Wo3E^FJ#djZ7>uy;L`aFmE?A}#IAMS z{rLw#rJ}f;zHjwB-*>5175l0IEsap!W{S2!ePXU<*DLwKqZfyFvQ zBgQ;O&|i5)WC7V|@P;3@nAr;HykRy%8Ha0TXwF`drMsE{1kY!{2j1S%6vi4(TdJ2F zJeB+xt=jZi2%%5uK*JcRC`GOhn&#I7KoIUfM>#d^mZM7Pc z-It@2NJCs+*ZWDlO{4B7^;g5IORn^eMhu2#jHCS<#OSpi>xk*ZJOZEnejL%MKuF#4 z&mu9JHsY_=3@9zOfYNPCd2$xsDT(>2=~;2-b+K>YtOKV4%3M~okzK2jrQ6nLHqgk@ z+X2(3m|D|=h$R42|5{%JAtw%lBDXVu*Y(N(ZsbuwMLGX41;C9l9;I5f0`OCKM+3J# zAg%8;Da5e%RHo_rdsyL@rkPOs`CUOo0hW$U3j|f(7=}^gY1x6pl~D)mvGSHplN=dAjWY2$#f#1h2+Ne2i!V_Dh;Dl36 z4GqT(){}(4c2Hy5+#JJCh*ikSV%|DF5&j1a7J?epO&JO5{yvvquXqSJ5xXwp!Lhh_ z#NS=pw=~H;g0EE?ZRI?5t8Um|x2VludWyqU9pN(c<&z9$iz2l%>h<1C7+86f3Yf~{ z-cpRSdz}h`BH9%gW2Y$yA!~-YJzrWYWa~tXTyM_hM3$_3C`b!iLYtPkH!s?F`|oC9 zV#>Oc!?eRYLmaTmm+c?be8Z!CZ{$a}$u_3r$1pJ+nI6MC(cUw2!TEMf&`C9%Gyc*O zPS`*l5+pnEx6(6jV87Ug`v*)uiqOR?DtomOT&U3`kKVHMn$HgjwoSL6vcBr6L;9Cw)gBDyF@@ zUbTvFl)5oLzVg57n*oo*FP+`(dc))r>_oh=jmh1V)YnUcJ~l5jj!W8rWJ{sg8G7 z?4@ME58CuND7I4zvrQ>}K+-K~Fpdl*t8dcZshHFRyYQtnXfT#I)Dqt!al9TVE;?!7 JwY}Ks{{v``W&;2K literal 0 HcmV?d00001 diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/util/GetPermissionIconByACL.java b/src/main/java/org/gcube/portlets/user/workspace/client/util/GetPermissionIconByACL.java index aca2022..9904c01 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/util/GetPermissionIconByACL.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/util/GetPermissionIconByACL.java @@ -23,6 +23,7 @@ public class GetPermissionIconByACL { String id = acl.getId(); if (id.compareTo("ADMINISTRATOR") == 0) { + return Resources.getIconAdministrator(); } else if (id.compareTo("READ_ONLY") == 0) { return Resources.getIconReadOnly(); } else if (id.compareTo("WRITE_OWNER") == 0) { diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelTogglePermission.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelTogglePermission.java index 048e390..72d42b1 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelTogglePermission.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/PanelTogglePermission.java @@ -2,7 +2,6 @@ package org.gcube.portlets.user.workspace.client.view.sharing; import java.util.List; -import org.gcube.portlets.user.workspace.client.resources.Resources; import org.gcube.portlets.user.workspace.client.util.GetPermissionIconByACL; import org.gcube.portlets.user.workspace.shared.WorkspaceACL; import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE; diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java index eb7a878..41dc835 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java @@ -2102,7 +2102,7 @@ public class GWTWorkspaceBuilder { switch (acl) { case ADMINISTRATOR: - acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.ADMINISTRATOR, "")); + acls.add(new WorkspaceACL(acl.toString(), "Admin", false, USER_TYPE.ADMINISTRATOR, "")); break; case READ_ONLY: acls.add(new WorkspaceACL(acl.toString(), "Read Only", false, USER_TYPE.OTHER, "Users can read any file but cannot update/delete")); 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 144ac71..f5f7ce9 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 @@ -111,7 +111,7 @@ public class WsUtil { // }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){ // // withoutPortal = true; - //END UNCOMMENT +//// END UNCOMMENT }else{ withoutPortal = false;