selector = (ServiceSelector) manager.lookup(AccessControllerResolver.ROLE + "Selector");
resolver = (AccessControllerResolver) selector
.select(AccessControllerResolver.DEFAULT_RESOLVER);
controller = resolver.resolveAccessController(webappUrl);
AccreditableManager accreditableManager = controller.getAccreditableManager();
UserManager userManager = accreditableManager.getUserManager();
User[] users = userManager.getUsers();
List usersWithRole = new ArrayList();
PolicyManager policyManager = controller.getPolicyManager();
Role roleObject = accreditableManager.getRoleManager().getRole(role);
for (int i = 0; i < users.length; i++) {
Identity identity = new Identity(logger);
identity.addIdentifiable(users[i]);
Role[] roles = policyManager.getGrantedRoles(accreditableManager, identity,