summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-11-16 11:42:06 -0500
committerJames Moger <james.moger@gitblit.com>2013-11-26 16:07:04 -0500
commit99d0d4fd66f3490b61c700065b7d16bc4e73f226 (patch)
tree0e5d8bd9e7b14905ab6ea71e8bf6253345415a70 /src/main/java/com/gitblit/wicket/pages/RootSubPage.java
parenta7a0b8ea01dca14602fdb49047d987c36461e861 (diff)
downloadgitblit-99d0d4fd66f3490b61c700065b7d16bc4e73f226.tar.gz
gitblit-99d0d4fd66f3490b61c700065b7d16bc4e73f226.zip
Eliminate nearly all direct GitBlit singleton references in Wicket
This is the first step towards modularization and injection. All direct references to the GitBlit singleton within the Wicket pages and panels have been replaced to proxy methods in the GitBlitWebApp singleton. There are still two Wicket classes which rely on the GitBlit singleton; those require manual instantiation (servlet 3). Change-Id: I0cdbbcf87959d590c446c99abb09c07c87c737bc
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/RootSubPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootSubPage.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/RootSubPage.java b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
index e81717a1..62d07a7f 100644
--- a/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
@@ -24,7 +24,6 @@ import org.apache.wicket.markup.html.basic.Label;
import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.Constants.AuthorizationControl;
-import com.gitblit.GitBlit;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.ModelUtils;
@@ -86,8 +85,8 @@ public abstract class RootSubPage extends RootPage {
}
}
- for (String repo : GitBlit.self().getRepositoryList()) {
- RepositoryModel repositoryModel = GitBlit.self().getRepositoryModel(repo);
+ for (String repo : app().repositories().getRepositoryList()) {
+ RepositoryModel repositoryModel = app().repositories().getRepositoryModel(repo);
if (repositoryModel.accessRestriction.exceeds(AccessRestrictionType.NONE)
&& repositoryModel.authorizationControl.equals(AuthorizationControl.NAMED)) {
if (user != null &&