*
* @return true if accessible or system is unable to determine because the current
* thread does not have a ServiceContext in its thread local store
*/
public static boolean isAccessibleService(Object serviceName) {
ServiceContext serviceContext = ServiceContext.get();
if(serviceContext == null) return true;
ServletContext servletContext = serviceContext.getServlet().getServletContext();
ConfigurableApplicationContext springContext = JeevesDelegatingFilterProxy.getApplicationContextFromServletContext(servletContext);
SecurityContext context = SecurityContextHolder.getContext();
if(springContext == null || context == null) return true;
Map<String, AbstractSecurityInterceptor> evals = springContext.getBeansOfType(AbstractSecurityInterceptor.class);
Authentication authentication = context.getAuthentication();
FilterInvocation fi = new FilterInvocation(null, "/srv/"+serviceContext.getLanguage()+"/"+serviceName, null);
for(AbstractSecurityInterceptor securityInterceptor: evals.values()) {
if(securityInterceptor == null) return true;
Collection<ConfigAttribute> attrs = securityInterceptor.obtainSecurityMetadataSource().getAttributes(fi);