summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-07-17 10:07:18 -0400
committerJames Moger <james.moger@gitblit.com>2013-07-17 10:07:18 -0400
commit34d1fdb4fe85d1297b7160fcce824a552031daae (patch)
tree2c4ea7ac2549ab4013754c41dd73e1cf6a0cb870 /src
parent27505e78686b7fd2884001dbef10e117b8e709e6 (diff)
downloadgitblit-34d1fdb4fe85d1297b7160fcce824a552031daae.tar.gz
gitblit-34d1fdb4fe85d1297b7160fcce824a552031daae.zip
Fixed bug with adding new local users with external authentication
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 301591f5..35ef7708 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -84,6 +84,7 @@ import org.slf4j.LoggerFactory;
import com.gitblit.Constants.AccessPermission;
import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.AccountType;
import com.gitblit.Constants.AuthenticationType;
import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.FederationRequest;
@@ -695,12 +696,12 @@ public class GitBlit implements ServletContextListener {
public boolean supportsCredentialChanges(UserModel user) {
if (user == null) {
return false;
- } else if (!Constants.EXTERNAL_ACCOUNT.equals(user.password)) {
- // credentials likely maintained by Gitblit
- return userService.supportsCredentialChanges();
+ } else if (AccountType.LOCAL.equals(user.accountType)) {
+ // local account, we can change credentials
+ return true;
} else {
- // credentials are externally maintained
- return false;
+ // external account, ask user service
+ return userService.supportsCredentialChanges();
}
}