@Test(expected = NotFoundException.class) public void testAssertCanAccessNull() { service.assertCanAccess(null, Scope.APPLICATION_ADMIN); }
protected final void assertCanAccess(final AbstractAuthzEntity entity, final String requiredScope) { if (entity == null) { throw new NotFoundException(); } User u = getCurrentUser(); if (u != null && u.equals(entity.getOwner())) { return; } if (getSecurityContext().isUserInRole(requiredScope)) { return; } throw new NotFoundException(); }
AbstractService { protected final void assertCanAccess(final AbstractAuthzEntity entity, final String requiredScope) { if (entity == null) { throw new NotFoundException(); } User u = getCurrentUser(); if (u != null && u.equals(entity.getOwner())) { return; } if (getSecurityContext().isUserInRole(requiredScope)) { return; } throw new NotFoundException(); } }
AbstractService { protected final void assertCanAccess(final AbstractAuthzEntity entity, final String requiredScope) { if (entity == null) { throw new NotFoundException(); } User u = getCurrentUser(); if (u != null && u.equals(entity.getOwner())) { return; } if (getSecurityContext().isUserInRole(requiredScope)) { return; } throw new NotFoundException(); }  }
AbstractService { protected final void assertCanAccess(final AbstractAuthzEntity entity, final String requiredScope) { if (entity == null) { throw new NotFoundException(); } User u = getCurrentUser(); if (u != null && u.equals(entity.getOwner())) { return; } if (getSecurityContext().isUserInRole(requiredScope)) { return; } throw new NotFoundException(); }  final InjectionManager getInjector(); final void setInjector(final InjectionManager injector); final UriInfo getUriInfo(); final void setUriInfo(final UriInfo uriInfo); final Session getSession(); final void setSession(final Session session); final SearchFactory getSearchFactory(); final void setSearchFactory(final SearchFactory searchFactory); final FullTextSession getFullTextSession(); final void setFullTextSession(
            final FullTextSession fullTextSession); final Configuration getConfig(); final void setConfig(final Configuration config); final SecurityContext getSecurityContext(); final void setSecurityContext(
            final SecurityContext securityContext); }
AbstractService { protected final void assertCanAccess(final AbstractAuthzEntity entity, final String requiredScope) { if (entity == null) { throw new NotFoundException(); } User u = getCurrentUser(); if (u != null && u.equals(entity.getOwner())) { return; } if (getSecurityContext().isUserInRole(requiredScope)) { return; } throw new NotFoundException(); }  final InjectionManager getInjector(); final void setInjector(final InjectionManager injector); final UriInfo getUriInfo(); final void setUriInfo(final UriInfo uriInfo); final Session getSession(); final void setSession(final Session session); final SearchFactory getSearchFactory(); final void setSearchFactory(final SearchFactory searchFactory); final FullTextSession getFullTextSession(); final void setFullTextSession(
            final FullTextSession fullTextSession); final Configuration getConfig(); final void setConfig(final Configuration config); final SecurityContext getSecurityContext(); final void setSecurityContext(
            final SecurityContext securityContext);  }