diff options
author | James Moger <james.moger@gitblit.com> | 2013-07-25 17:27:36 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-07-25 18:05:40 -0400 |
commit | d5bdbdf6f0d54d4753f35a9b519fb7da2c2a9da7 (patch) | |
tree | 139cabf2b5249a8bccf90672af5f2e0ff4ef4609 /src/main/java | |
parent | f1e5dcfa2c482da22154df0245a906c43aee3510 (diff) | |
download | gitblit-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.java | 9 |
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")) {
|