| | |
| | | super.init();
|
| | |
|
| | | // Setup page authorization mechanism
|
| | | if (GitBlit.self().settings().getBoolean(Keys.web.authenticate, false)) {
|
| | | boolean useAuthentication = GitBlit.self().settings().getBoolean(Keys.web.authenticateViewPages, false) || GitBlit.self().settings().getBoolean(Keys.web.authenticateAdminPages, false);
|
| | | if (useAuthentication) {
|
| | | AuthorizationStrategy authStrategy = new AuthorizationStrategy();
|
| | | getSecuritySettings().setAuthorizationStrategy(authStrategy);
|
| | | getSecuritySettings().setUnauthorizedComponentInstantiationListener(authStrategy);
|
| | |
| | | mount(new MixedParamUrlCodingStrategy("/ticgittkt", TicGitTicketPage.class, new String[] { "r", "h", "f" }));
|
| | |
|
| | | // setup login/logout urls, if we are using authentication
|
| | | if (GitBlit.self().settings().getBoolean(Keys.web.authenticate, true)) {
|
| | | if (useAuthentication) {
|
| | | mount(new MixedParamUrlCodingStrategy("/login", LoginPage.class, new String[] {}));
|
| | | mount(new MixedParamUrlCodingStrategy("/logout", LogoutPage.class, new String[] {}));
|
| | | }
|