summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-06-14 16:55:13 -0400
committerJames Moger <james.moger@gitblit.com>2011-06-14 16:55:13 -0400
commit8c9a2037b5c0fed881a3ad6dd9cff364eed603d9 (patch)
tree2144915a2eae2ad9180715da76ddc3ec058b331e /tests
parentc2272275ca990f3e12a5c1fa0a5de4c670a4d8b4 (diff)
downloadgitblit-8c9a2037b5c0fed881a3ad6dd9cff364eed603d9.tar.gz
gitblit-8c9a2037b5c0fed881a3ad6dd9cff364eed603d9.zip
Added AccessRestrictionFilter and simplified authentication.
Replaced servlet container basic authentication with a custom servlet filter which performs the same function. The advantage to this is that the servlet container is now divorced from the webapp. The login service (realm) also simplified a great deal and removes its Jetty dependencies. Additionally, the basic authorization pop-up will be displayed as needed based on the repository's access restriction. This was necessary for view-restricted repositories with the RSS feature. Its also necessary for completely open repositories as before it would prompt for credentials. Improved feed syndication feature.
Diffstat (limited to 'tests')
-rw-r--r--tests/com/gitblit/tests/GitBlitSuite.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/com/gitblit/tests/GitBlitSuite.java b/tests/com/gitblit/tests/GitBlitSuite.java
index e13e1bbf..c9e383e7 100644
--- a/tests/com/gitblit/tests/GitBlitSuite.java
+++ b/tests/com/gitblit/tests/GitBlitSuite.java
@@ -24,10 +24,10 @@ import junit.framework.TestSuite;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileRepository;
+import com.gitblit.FileLoginService;
import com.gitblit.FileSettings;
import com.gitblit.GitBlit;
import com.gitblit.GitBlitException;
-import com.gitblit.JettyLoginService;
import com.gitblit.models.RepositoryModel;
import com.gitblit.utils.JGitUtils;
@@ -72,8 +72,7 @@ public class GitBlitSuite extends TestSetup {
protected void setUp() throws Exception {
FileSettings settings = new FileSettings("distrib/gitblit.properties");
GitBlit.self().configureContext(settings);
- JettyLoginService loginService = new JettyLoginService(new File("distrib/users.properties"));
- loginService.loadUsers();
+ FileLoginService loginService = new FileLoginService(new File("distrib/users.properties"));
GitBlit.self().setLoginService(loginService);
if (REPOSITORIES.exists() || REPOSITORIES.mkdirs()) {