summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-07-25 17:27:36 -0400
committerJames Moger <james.moger@gitblit.com>2013-07-25 18:05:40 -0400
commitd5bdbdf6f0d54d4753f35a9b519fb7da2c2a9da7 (patch)
tree139cabf2b5249a8bccf90672af5f2e0ff4ef4609 /src/main/java
parentf1e5dcfa2c482da22154df0245a906c43aee3510 (diff)
downloadgitblit-d5bdbdf6f0d54d4753f35a9b519fb7da2c2a9da7.tar.gz
gitblit-d5bdbdf6f0d54d4753f35a9b519fb7da2c2a9da7.zip
Fixed Gitblit Authority failing to load realm.NNN.backingUserService (issue-280)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/gitblit/authority/GitblitAuthority.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/authority/GitblitAuthority.java b/src/main/java/com/gitblit/authority/GitblitAuthority.java
index e0b079ea..bddb1cfc 100644
--- a/src/main/java/com/gitblit/authority/GitblitAuthority.java
+++ b/src/main/java/com/gitblit/authority/GitblitAuthority.java
@@ -261,12 +261,9 @@ public class GitblitAuthority extends JFrame implements X509Log {
String us = gitblitSettings.getString(Keys.realm.userService, "${baseFolder}/users.conf");
String ext = us.substring(us.lastIndexOf(".") + 1).toLowerCase();
IUserService service = null;
- if (!ext.equals("conf") && !ext.equals("properties")) {
- if (us.equals("com.gitblit.LdapUserService")) {
- us = gitblitSettings.getString(Keys.realm.ldap.backingUserService, "${baseFolder}/users.conf");
- } else if (us.equals("com.gitblit.LdapUserService")) {
- us = gitblitSettings.getString(Keys.realm.redmine.backingUserService, "${baseFolder}/users.conf");
- }
+ if (!ext.equals("conf") && !ext.equals("properties") && ext.contains("userservice")) {
+ String realm = ext.substring(0, ext.indexOf("userservice"));
+ us = gitblitSettings.getString(MessageFormat.format("realm.{0}.backingUserService", realm), "${baseFolder}/users.conf");
}
if (us.endsWith(".conf")) {