fixing the method getAdministrators
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@174502 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
da556014ae
commit
fbeb6a3f93
|
@ -2500,16 +2500,21 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
*/
|
||||
@Override
|
||||
public List<InfoContactModel> getAdministratorsByFolderId(String folderId) throws Exception {
|
||||
List<InfoContactModel> admins = new ArrayList<InfoContactModel>();
|
||||
|
||||
if(folderId==null)
|
||||
return admins;
|
||||
return new ArrayList<InfoContactModel>();
|
||||
try {
|
||||
workspaceLogger.info("Getting administator/s to folder: "+folderId);
|
||||
workspaceLogger.info("Getting administator/s for the folder: "+folderId);
|
||||
WorkspaceFolder wsFolder = getSharedWorkspaceFolderForId(folderId);
|
||||
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
||||
WorkspaceSharedFolder wsSharedFolder = (WorkspaceSharedFolder) wsFolder;
|
||||
return builder.buildGxtInfoContactsFromPortalLogins(wsSharedFolder.getAdministrators());
|
||||
|
||||
//Reading the base Shared Folder
|
||||
Workspace workspace = getWorkspace();
|
||||
WorkspaceSharedFolder wsBaseSharedFolder = (WorkspaceSharedFolder) workspace.getItem(wsFolder.getIdSharedFolder());
|
||||
//Reading ADMINS from Root Shared Folder
|
||||
List<String> admins = wsBaseSharedFolder.getAdministrators();
|
||||
|
||||
workspaceLogger.info("Returning admin/s from HL: "+admins.toString());
|
||||
return GWTWorkspaceBuilder.buildGxtInfoContactsFromPortalLogins(admins);
|
||||
|
||||
} catch (WorkspaceHandledException e){
|
||||
workspaceLogger.error("Error in server getAdministratorsByFolderId: "+e.getMessage());
|
||||
|
@ -2569,6 +2574,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
*/
|
||||
@Override
|
||||
public WorkspaceACL getACLBySharedFolderId(String identifier) throws Exception {
|
||||
//THESE ARE WRITE_OWN, WRITE_ALL, READ_ONLY
|
||||
workspaceLogger.info("Getting ACLBySharedFolderId: "+identifier);
|
||||
if(identifier==null || identifier.isEmpty()){
|
||||
workspaceLogger.warn("Getting ACLBySharedFolderId identifier is null or empty, returning null");
|
||||
|
|
Loading…
Reference in New Issue