public static final String NOT_FEDERATED_ROLE = "#notfederated";\r
\r
public static final String NO_ROLE = "#none";\r
+ \r
+ public static final String EXTERNAL_ACCOUNT = "#externalAccount";\r
\r
public static final String PROPERTIES_FILE = "gitblit.properties";\r
\r
\r
protected IUserService serviceImpl;\r
\r
- protected final String ExternalAccount = "#externalAccount";\r
-\r
private final Logger logger = LoggerFactory.getLogger(GitblitUserService.class);\r
\r
public GitblitUserService() {\r
protected void setAccountType(UserModel user) {\r
if (user != null) {\r
if (!StringUtils.isEmpty(user.password)\r
- && !ExternalAccount.equalsIgnoreCase(user.password)\r
+ && !Constants.EXTERNAL_ACCOUNT.equalsIgnoreCase(user.password)\r
&& !"StoredInLDAP".equalsIgnoreCase(user.password)) {\r
user.accountType = AccountType.LOCAL;\r
} else {\r
logger.debug("detecting removed LDAP users...");\r
\r
for (UserModel userModel : super.getAllUsers()) {\r
- if (ExternalAccount.equals(userModel.password)) {\r
+ if (Constants.EXTERNAL_ACCOUNT.equals(userModel.password)) {\r
if (! ldapUsers.containsKey(userModel.username)) {\r
logger.info("deleting removed LDAP user " + userModel.username + " from backing user service");\r
super.deleteUser(userModel.username);\r
setAdminAttribute(user);\r
\r
// Don't want visibility into the real password, make up a dummy\r
- user.password = ExternalAccount;\r
+ user.password = Constants.EXTERNAL_ACCOUNT;\r
user.accountType = getAccountType();\r
\r
// Get full name Attribute\r
user.accountType = getAccountType();\r
user.displayName = current.user.firstname + " " + current.user.lastname;\r
user.emailAddress = current.user.mail;\r
- user.password = ExternalAccount;\r
+ user.password = Constants.EXTERNAL_ACCOUNT;\r
if (!StringUtils.isEmpty(current.user.login)) {\r
// only admin users can get login name\r
// evidently this is an undocumented behavior of Redmine\r
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