Convert ListChildProjects to PermissionBackend
Rewrite the code to use Java 8 streams and the new PermissionBackend to filter batches of direct children for ACCESS permission. Change-Id: I7ca6b5566a6ec675760dc937db369e9150546dd3
This commit is contained in:

committed by
David Pursehouse

parent
cb149254bb
commit
571f99c02a
@@ -378,7 +378,11 @@ public class ProjectApiImpl implements ProjectApi {
|
||||
public List<ProjectInfo> children(boolean recursive) throws RestApiException {
|
||||
ListChildProjects list = children.list();
|
||||
list.setRecursive(recursive);
|
||||
return list.apply(checkExists());
|
||||
try {
|
||||
return list.apply(checkExists());
|
||||
} catch (PermissionBackendException e) {
|
||||
throw new RestApiException("Cannot list children", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user