addPermission("/", guests, ContentPermissionType.READ);
addPermission("/about", guests, ContentPermissionType.DENIED);
addPermission("/about", developers, ContentPermissionType.READ);
addPermission("/about/team", developers, ContentPermissionType.WRITE);
addPermission("/", managers, ContentPermissionType.PUBLISH);
ContentPermissionEntity p = getBusiness().getContentPermissionBusiness()
.getPermission("/", developer);
assertEquals(ContentPermissionType.READ, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getPermission(
"/about", developer);
assertEquals(ContentPermissionType.READ, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getPermission(
"/about/team", developer);
assertEquals(ContentPermissionType.WRITE, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getPermission(
"/about/team", manager);
assertEquals(ContentPermissionType.PUBLISH, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getPermission(
"/about/team", manager);
assertEquals(ContentPermissionType.PUBLISH, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getGuestPermission(
"/");
assertEquals(ContentPermissionType.READ, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getGuestPermission(
"/about");
assertEquals(ContentPermissionType.DENIED, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getGuestPermission(
"/about/team");
assertEquals(ContentPermissionType.DENIED, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getGuestPermission(
"/services");
assertEquals(ContentPermissionType.READ, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getGuestPermission(
"/services/php");
assertEquals(ContentPermissionType.READ, p.getPermission());
p = getBusiness().getContentPermissionBusiness().getPermission(
"/about/team", dev2);
assertEquals(ContentPermissionType.PUBLISH, p.getPermission());
}