protected boolean isUsecaseAuthorized(String webappUrl, String usecaseName) throws Exception {
boolean authorized = false;
ServiceSelector selector = null;
AccessControllerResolver acResolver = null;
AccessController accessController = null;
ContextUtility contextUtil = null;
try {
selector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE
+ "Selector");
acResolver = (AccessControllerResolver) selector
.select(AccessControllerResolver.DEFAULT_RESOLVER);
accessController = acResolver.resolveAccessController(webappUrl);
contextUtil = (ContextUtility) this.manager.lookup(ContextUtility.ROLE);
Request request = contextUtil.getRequest();
DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
URLInformation info = new URLInformation(webappUrl);
Publication pub = factory.getPublication(info.getPublicationId());
Role[] roles = PolicyUtil.getRoles(request);