private void checkUserAccessFlat(DataAccessManager manager, Authentication user, boolean expectedRead, boolean expectedWrite) {
// states as a layer
assertEquals(expectedRead, manager.canAccess(user, statesLayer, AccessMode.READ));
assertEquals(expectedWrite, manager.canAccess(user, statesLayer, AccessMode.WRITE));
// states as a resource
final ResourceInfo resource = statesLayer.getResource();
assertEquals(expectedRead, manager.canAccess(user, resource, AccessMode.READ));
assertEquals(expectedWrite, manager.canAccess(user, resource, AccessMode.WRITE));
// the topp ws
assertEquals(expectedRead, manager.canAccess(user, toppWs, AccessMode.READ));
assertEquals(expectedWrite, manager.canAccess(user, toppWs, AccessMode.WRITE));