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