summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/RepositoryPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-04-14 18:29:10 -0400
committerJames Moger <james.moger@gitblit.com>2011-04-14 18:29:10 -0400
commitfc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9 (patch)
tree4287442c5d74c26c3e4826bc79d02c804cd0f8c4 /src/com/gitblit/wicket/RepositoryPage.java
parent94b96b5a98bef254128ccc4f5fc0e0c4376324e4 (diff)
downloadgitblit-fc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9.tar.gz
gitblit-fc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9.zip
Authenticate the webapp against the same realm as the git servlet.
Right now the implementation is hard-coded to pass the realm into a singleton. This won't work for a WAR distribution so I will need to figure out how to properly authenticate the webapp using form authentication and the git servlet using basic authentication - host against the same realm.
Diffstat (limited to 'src/com/gitblit/wicket/RepositoryPage.java')
-rw-r--r--src/com/gitblit/wicket/RepositoryPage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/RepositoryPage.java b/src/com/gitblit/wicket/RepositoryPage.java
index 05617718..8dc485a5 100644
--- a/src/com/gitblit/wicket/RepositoryPage.java
+++ b/src/com/gitblit/wicket/RepositoryPage.java
@@ -12,6 +12,7 @@ import org.apache.wicket.protocol.http.servlet.ServletWebRequest;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import com.gitblit.GitBlit;
import com.gitblit.StoredSettings;
import com.gitblit.utils.JGitUtils;
import com.gitblit.wicket.pages.RepositoriesPage;
@@ -51,7 +52,7 @@ public abstract class RepositoryPage extends BasePage {
HttpServletRequest req = servletWebRequest.getHttpServletRequest();
req.getServerName();
- Repository r = GitBlitWebApp.get().getRepository(req, repositoryName);
+ Repository r = GitBlit.self().getRepository(req, repositoryName);
if (r == null) {
error("Can not load repository " + repositoryName);
redirectToInterceptPage(new RepositoriesPage());