summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/gitblit/Constants.java2
-rw-r--r--src/main/java/com/gitblit/GitblitUserService.java4
-rw-r--r--src/main/java/com/gitblit/LdapUserService.java4
-rw-r--r--src/main/java/com/gitblit/RedmineUserService.java2
-rw-r--r--src/main/java/com/gitblit/SalesforceUserService.java2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/gitblit/Constants.java b/src/main/java/com/gitblit/Constants.java
index cd0fea6c..5ed0a256 100644
--- a/src/main/java/com/gitblit/Constants.java
+++ b/src/main/java/com/gitblit/Constants.java
@@ -43,6 +43,8 @@ public class Constants {
public static final String NOT_FEDERATED_ROLE = "#notfederated";
public static final String NO_ROLE = "#none";
+
+ public static final String EXTERNAL_ACCOUNT = "#externalAccount";
public static final String PROPERTIES_FILE = "gitblit.properties";
diff --git a/src/main/java/com/gitblit/GitblitUserService.java b/src/main/java/com/gitblit/GitblitUserService.java
index fe35db94..658404b5 100644
--- a/src/main/java/com/gitblit/GitblitUserService.java
+++ b/src/main/java/com/gitblit/GitblitUserService.java
@@ -52,8 +52,6 @@ public class GitblitUserService implements IUserService {
protected IUserService serviceImpl;
- protected final String ExternalAccount = "#externalAccount";
-
private final Logger logger = LoggerFactory.getLogger(GitblitUserService.class);
public GitblitUserService() {
@@ -324,7 +322,7 @@ public class GitblitUserService implements IUserService {
protected void setAccountType(UserModel user) {
if (user != null) {
if (!StringUtils.isEmpty(user.password)
- && !ExternalAccount.equalsIgnoreCase(user.password)
+ && !Constants.EXTERNAL_ACCOUNT.equalsIgnoreCase(user.password)
&& !"StoredInLDAP".equalsIgnoreCase(user.password)) {
user.accountType = AccountType.LOCAL;
} else {
diff --git a/src/main/java/com/gitblit/LdapUserService.java b/src/main/java/com/gitblit/LdapUserService.java
index 2867b88f..39d564dd 100644
--- a/src/main/java/com/gitblit/LdapUserService.java
+++ b/src/main/java/com/gitblit/LdapUserService.java
@@ -129,7 +129,7 @@ public class LdapUserService extends GitblitUserService {
logger.debug("detecting removed LDAP users...");
for (UserModel userModel : super.getAllUsers()) {
- if (ExternalAccount.equals(userModel.password)) {
+ if (Constants.EXTERNAL_ACCOUNT.equals(userModel.password)) {
if (! ldapUsers.containsKey(userModel.username)) {
logger.info("deleting removed LDAP user " + userModel.username + " from backing user service");
super.deleteUser(userModel.username);
@@ -344,7 +344,7 @@ public class LdapUserService extends GitblitUserService {
setAdminAttribute(user);
// Don't want visibility into the real password, make up a dummy
- user.password = ExternalAccount;
+ user.password = Constants.EXTERNAL_ACCOUNT;
user.accountType = getAccountType();
// Get full name Attribute
diff --git a/src/main/java/com/gitblit/RedmineUserService.java b/src/main/java/com/gitblit/RedmineUserService.java
index 2728e004..d677e3e4 100644
--- a/src/main/java/com/gitblit/RedmineUserService.java
+++ b/src/main/java/com/gitblit/RedmineUserService.java
@@ -135,7 +135,7 @@ public class RedmineUserService extends GitblitUserService {
user.accountType = getAccountType();
user.displayName = current.user.firstname + " " + current.user.lastname;
user.emailAddress = current.user.mail;
- user.password = ExternalAccount;
+ user.password = Constants.EXTERNAL_ACCOUNT;
if (!StringUtils.isEmpty(current.user.login)) {
// only admin users can get login name
// evidently this is an undocumented behavior of Redmine
diff --git a/src/main/java/com/gitblit/SalesforceUserService.java b/src/main/java/com/gitblit/SalesforceUserService.java
index 4a6a1bae..989b4878 100644
--- a/src/main/java/com/gitblit/SalesforceUserService.java
+++ b/src/main/java/com/gitblit/SalesforceUserService.java
@@ -96,7 +96,7 @@ public class SalesforceUserService extends GitblitUserService {
private void setUserAttributes(UserModel user, GetUserInfoResult info) {
// Don't want visibility into the real password, make up a dummy
- user.password = ExternalAccount;
+ user.password = Constants.EXTERNAL_ACCOUNT;
user.accountType = getAccountType();
// Get full name Attribute