@Test public void testTimeoutedUser() { HttpServletRequest req; Assert.assertFalse(plugin.isAllowed(req = createRequest("007", true), new Group())); Assert.assertNull(req.getAttribute(UserPlugin.REQUEST_ATTR)); Assert.assertFalse(plugin.isAllowed(req = createRequest("008", true), new Project())); Assert.assertNull(req.getAttribute(UserPlugin.REQUEST_ATTR)); Assert.assertFalse(plugin.isAllowed(req = createRequest("009", true), createGroup("some group"))); Assert.assertNull(req.getAttribute(UserPlugin.REQUEST_ATTR)); Assert.assertFalse(plugin.isAllowed(req = createRequest("00A", true), createProject("some project"))); Assert.assertNull(req.getAttribute(UserPlugin.REQUEST_ATTR)); }
@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; }