Catched Generic Exception
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@149153 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2de99d605f
commit
834898a466
|
@ -2862,15 +2862,12 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<ACLType, List<String>> mapACL = folder.getACLOwner();
|
Map<ACLType, List<String>> mapACL = folder.getACLOwner();
|
||||||
|
|
||||||
ACLType settingACL = ACLType.valueOf(aclType);
|
ACLType settingACL = ACLType.valueOf(aclType);
|
||||||
|
|
||||||
workspaceLogger.info("Validating assignment: "+settingACL);
|
workspaceLogger.info("Validating assignment: "+settingACL);
|
||||||
workspaceLogger.info("To logins: "+listLogins);
|
workspaceLogger.info("To logins: "+listLogins);
|
||||||
|
|
||||||
AclTypeComparator comparator = new AclTypeComparator();
|
AclTypeComparator comparator = new AclTypeComparator();
|
||||||
|
|
||||||
List<String> errors = new ArrayList<String>();
|
List<String> errors = new ArrayList<String>();
|
||||||
|
|
||||||
//TO REMOVE ADMINS
|
//TO REMOVE ADMINS
|
||||||
List<String> admins = mapACL.get(ACLType.ADMINISTRATOR);
|
List<String> admins = mapACL.get(ACLType.ADMINISTRATOR);
|
||||||
for (String admin : admins) {
|
for (String admin : admins) {
|
||||||
|
@ -2885,7 +2882,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
//TO COMPLETE REPORT
|
//TO COMPLETE REPORT
|
||||||
List<String> validLogins = new ArrayList<String>(listLogins);
|
List<String> validLogins = new ArrayList<String>(listLogins);
|
||||||
ReportAssignmentACL reportValidation = new ReportAssignmentACL();
|
ReportAssignmentACL reportValidation = new ReportAssignmentACL();
|
||||||
|
|
||||||
workspaceLogger.debug("\nChecking listLogins: "+listLogins);
|
workspaceLogger.debug("\nChecking listLogins: "+listLogins);
|
||||||
|
|
||||||
for (String username : listLogins) {
|
for (String username : listLogins) {
|
||||||
|
@ -2928,18 +2924,12 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
workspaceLogger.info("Set ACL: "+settingACL+ " to "+username);
|
workspaceLogger.info("Set ACL: "+settingACL+ " to "+username);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
System.out.println("\n");
|
|
||||||
for (String error : errors) {
|
|
||||||
workspaceLogger.trace(error);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
reportValidation.setAclType(aclType);
|
reportValidation.setAclType(aclType);
|
||||||
reportValidation.setErrors(errors);
|
reportValidation.setErrors(errors);
|
||||||
reportValidation.setValidLogins(validLogins);
|
reportValidation.setValidLogins(validLogins);
|
||||||
return reportValidation;
|
return reportValidation;
|
||||||
|
|
||||||
} catch (InternalErrorException e) {
|
} catch (Exception e) {
|
||||||
throw new Exception("Sorry, an error occurred when validating ACL assignment, try again later");
|
throw new Exception("Sorry, an error occurred when validating ACL assignment, try again later");
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
|
|
Loading…
Reference in New Issue