fixed change permissions

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@92754 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-03-06 14:31:04 +00:00
parent 493beb0ab1
commit 1f8f454490
7 changed files with 13 additions and 14 deletions

View File

@ -236,7 +236,7 @@ public interface Icons extends ClientBundle {
@Source("icons/sharingFolder.png") @Source("icons/sharingFolder.png")
ImageResource shareFolder(); ImageResource shareFolder();
@Source("icons/sharedFolder.png") @Source("icons/sharedFolder3.png")
ImageResource sharedFolder(); ImageResource sharedFolder();
@Source("icons/unSharingFolder.gif") @Source("icons/unSharingFolder.gif")

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

View File

@ -204,7 +204,7 @@ public interface GWTWorkspaceService extends RemoteService{
String getMyLogin(); String getMyLogin();
void setACLForVRE(String folderId, String aclType) throws Exception; void updateACLForVREbyGroupIds(String folderId, String aclType) throws Exception;
/** /**
* @param folderId * @param folderId

View File

@ -182,7 +182,7 @@ public interface GWTWorkspaceServiceAsync {
void getMyLogin(AsyncCallback<String> callback); void getMyLogin(AsyncCallback<String> callback);
void setACLForVRE(String folderId, String aclType, void updateACLForVREbyGroupIds(String folderId, String aclType,
AsyncCallback<Void> callback); AsyncCallback<Void> callback);
void getUserACLForFolderId(String folderId, void getUserACLForFolderId(String folderId,

View File

@ -716,8 +716,9 @@ public class ContextMenuTree {
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder
contextMenu.getItemByItemId(WorkspaceOperation.UNSHARE.getId()).setVisible(false); //UNSHARE contextMenu.getItemByItemId(WorkspaceOperation.UNSHARE.getId()).setVisible(false); //UNSHARE
contextMenu.getItemByItemId(WorkspaceOperation.RENAME.getId()).setVisible(false); //UNSHARE contextMenu.getItemByItemId(WorkspaceOperation.RENAME.getId()).setVisible(false); //RENAME
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //UNSHARE contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //REMOVE
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(true); //REFRESH_FOLDER
return; return;
} }

View File

@ -2654,16 +2654,13 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
* @throws Exception * @throws Exception
*/ */
@Override @Override
public void setACLForVRE(String folderId, String aclType) throws Exception{ public void updateACLForVREbyGroupIds(String folderId, String aclType) throws Exception{
try { try {
if(folderId == null) if(folderId == null)
throw new Exception("Folder id is null"); throw new Exception("Folder id is null");
List<String> listLogins = new ArrayList<String>(); workspaceLogger.trace("Updating ACL to VRE FOLDER id: "+folderId);
listLogins.add(getMyLogin());
workspaceLogger.trace("Setting ACL for VRE FOLDER id: "+folderId);
workspaceLogger.trace("ACL type is: "+aclType); workspaceLogger.trace("ACL type is: "+aclType);
Workspace workspace = getWorkspace(); Workspace workspace = getWorkspace();
@ -2671,14 +2668,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
if(wsItem.isShared() && (wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER))){ if(wsItem.isShared() && (wsItem.getType().equals(WorkspaceItemType.SHARED_FOLDER))){
WorkspaceSharedFolder ite = (WorkspaceSharedFolder) workspace.getItemByPath(wsItem.getPath()); WorkspaceSharedFolder ite = (WorkspaceSharedFolder) workspace.getItemByPath(wsItem.getPath());
ite.setACL(listLogins, ACLType.valueOf(aclType)); ite.setACL(ite.getGroupIds(), ACLType.valueOf(aclType));
}else }else
throw new Exception("Source item is not shared or shared folder"); throw new Exception("Source item is not shared or shared folder");
workspaceLogger.trace("Setting ACL completed, retuning"); workspaceLogger.trace("Updating ACL completed, retuning");
} catch (Exception e) { } catch (Exception e) {
workspaceLogger.error("Error in set ACLs", e); workspaceLogger.error("Error in set ACLs", e);
String error = ConstantsExplorer.SERVER_ERROR +" setting permissions. "+e.getMessage(); String error = ConstantsExplorer.SERVER_ERROR +" updating permissions. "+e.getMessage();
throw new Exception(error); throw new Exception(error);
} }
} }

View File

@ -84,6 +84,7 @@ public class WsUtil {
//UNCOMMENT THIS IN DEVELOP ENVIROMENT //UNCOMMENT THIS IN DEVELOP ENVIROMENT
// user = "francesco.mangiacrapa"; // user = "francesco.mangiacrapa";
// user = "valentina.marioli";
logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:"); logger.warn("WORKSPACE PORTLET STARTING IN TEST MODE - NO USER FOUND - PORTLETS STARTING WITH FOLLOWING SETTINGS:");
logger.warn("session id: "+sessionID); logger.warn("session id: "+sessionID);
@ -111,7 +112,7 @@ public class WsUtil {
withoutPortal = true; withoutPortal = true;
//COMMENT THIS IN PRODUCTION ENVIROMENT //COMMENT THIS IN PRODUCTION ENVIROMENT
// }else if(user.compareToIgnoreCase("francesco.mangiacrapa")==0){ // }else if(user.compareToIgnoreCase("valentina.marioli")==0){
// //
// withoutPortal = true; // withoutPortal = true;
//// END UNCOMMENT //// END UNCOMMENT