AuthenticationManager newAuthenticationManager() {
XssFilter xssFilter = new AllowXssFilter();
RuntimeManager runtime = new RuntimeManager(getSettings(), xssFilter, GitBlitSuite.BASEFOLDER).start();
UserManager users = new UserManager(runtime, null).start();
RedmineAuthProvider redmine = new RedmineAuthProvider();
redmine.setup(runtime, users);
redmine.setTestingCurrentUserAsJson(JSON);
AuthenticationManager auth = new AuthenticationManager(runtime, users);
auth.addAuthenticationProvider(redmine);
return auth;
}