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
|
@Override
|
||||||
public List<InfoContactModel> getAdministratorsByFolderId(String folderId) throws Exception {
|
public List<InfoContactModel> getAdministratorsByFolderId(String folderId) throws Exception {
|
||||||
List<InfoContactModel> admins = new ArrayList<InfoContactModel>();
|
|
||||||
|
|
||||||
if(folderId==null)
|
if(folderId==null)
|
||||||
return admins;
|
return new ArrayList<InfoContactModel>();
|
||||||
try {
|
try {
|
||||||
workspaceLogger.info("Getting administator/s to folder: "+folderId);
|
workspaceLogger.info("Getting administator/s for the folder: "+folderId);
|
||||||
WorkspaceFolder wsFolder = getSharedWorkspaceFolderForId(folderId);
|
WorkspaceFolder wsFolder = getSharedWorkspaceFolderForId(folderId);
|
||||||
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
|
||||||
WorkspaceSharedFolder wsSharedFolder = (WorkspaceSharedFolder) wsFolder;
|
//Reading the base Shared Folder
|
||||||
return builder.buildGxtInfoContactsFromPortalLogins(wsSharedFolder.getAdministrators());
|
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){
|
} catch (WorkspaceHandledException e){
|
||||||
workspaceLogger.error("Error in server getAdministratorsByFolderId: "+e.getMessage());
|
workspaceLogger.error("Error in server getAdministratorsByFolderId: "+e.getMessage());
|
||||||
|
@ -2569,6 +2574,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public WorkspaceACL getACLBySharedFolderId(String identifier) throws Exception {
|
public WorkspaceACL getACLBySharedFolderId(String identifier) throws Exception {
|
||||||
|
//THESE ARE WRITE_OWN, WRITE_ALL, READ_ONLY
|
||||||
workspaceLogger.info("Getting ACLBySharedFolderId: "+identifier);
|
workspaceLogger.info("Getting ACLBySharedFolderId: "+identifier);
|
||||||
if(identifier==null || identifier.isEmpty()){
|
if(identifier==null || identifier.isEmpty()){
|
||||||
workspaceLogger.warn("Getting ACLBySharedFolderId identifier is null or empty, returning null");
|
workspaceLogger.warn("Getting ACLBySharedFolderId identifier is null or empty, returning null");
|
||||||
|
|
Loading…
Reference in New Issue