@Test public void testNoUser() { Assert.assertFalse(plugin.isAllowed(new DummyHttpServletRequestUser(), new Group())); Assert.assertFalse(plugin.isAllowed(new DummyHttpServletRequestUser(), new Project())); Assert.assertFalse(plugin.isAllowed(new DummyHttpServletRequestUser(), createGroup("some group"))); Assert.assertFalse(plugin.isAllowed(new DummyHttpServletRequestUser(), createProject("some project"))); }
@Override public boolean isAllowed(HttpServletRequest request, Project project) { return getUser(request) != null; }
UserPlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return getUser(request) != null; } }
UserPlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return getUser(request) != null; } UserPlugin(); protected  UserPlugin(IUserDecoder decoder); }
UserPlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return getUser(request) != null; } UserPlugin(); protected  UserPlugin(IUserDecoder decoder); @Override void load(Map<String, Object> parameters); @Override void unload(); @Override boolean isAllowed(HttpServletRequest request, Project project); @Override boolean isAllowed(HttpServletRequest request, Group group); }
UserPlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return getUser(request) != null; } UserPlugin(); protected  UserPlugin(IUserDecoder decoder); @Override void load(Map<String, Object> parameters); @Override void unload(); @Override boolean isAllowed(HttpServletRequest request, Project project); @Override boolean isAllowed(HttpServletRequest request, Group group); static final String REQUEST_ATTR; }