@Test public void shouldAllowRandomUserForAnyProject() { DummyHttpServletRequest req = new DummyHttpServletRequest(); req.setAttribute(UserPlugin.REQUEST_ATTR, new User(RandomString.generateUpper(8))); Project randomProject = new Project(RandomString.generateUpper(10)); boolean projectAllowed = plugin.isAllowed(req, randomProject); assertTrue("should allow rando for random project 1", projectAllowed); randomProject = new Project(RandomString.generateUpper(10)); projectAllowed = plugin.isAllowed(req, randomProject); assertTrue("should allow rando for random project 2", projectAllowed); }
@Override public boolean isAllowed(HttpServletRequest request, Project project) { return true; }
TruePlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return true; } }
TruePlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return true; }  }
TruePlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return true; }  @Override void load(Map<String, Object> parameters); @Override void unload(); @Override boolean isAllowed(HttpServletRequest request, Project project); @Override boolean isAllowed(HttpServletRequest request, Group group); }
TruePlugin implements IAuthorizationPlugin { @Override public boolean isAllowed(HttpServletRequest request, Project project) { return true; }  @Override void load(Map<String, Object> parameters); @Override void unload(); @Override boolean isAllowed(HttpServletRequest request, Project project); @Override boolean isAllowed(HttpServletRequest request, Group group);  }