style: 修改用户来源标识
This commit is contained in:
parent
9045102e21
commit
327e06f0b7
|
@ -1,5 +1,5 @@
|
|||
package io.metersphere.commons.constants;
|
||||
|
||||
public enum UserSource {
|
||||
Local, Ldap
|
||||
LOCAL, LDAP
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class LdapController {
|
|||
user.setName(username);
|
||||
user.setEmail(email);
|
||||
user.setPassword(password);
|
||||
user.setSource(UserSource.Ldap.name());
|
||||
user.setSource(UserSource.LDAP.name());
|
||||
userService.addLdapUser(user);
|
||||
} else {
|
||||
request.setUsername(u.getId());
|
||||
|
|
|
@ -138,7 +138,7 @@ public class UserService {
|
|||
user.setUpdateTime(System.currentTimeMillis());
|
||||
// 默认1:启用状态
|
||||
user.setStatus(UserStatus.NORMAL);
|
||||
user.setSource(UserSource.Local.name());
|
||||
user.setSource(UserSource.LOCAL.name());
|
||||
// 密码使用 MD5
|
||||
user.setPassword(CodingUtil.md5(user.getPassword()));
|
||||
checkEmailIsExist(user.getEmail());
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
alter table user add source varchar(50) null;
|
||||
|
||||
update user set source = 'Local' where source is null;
|
||||
update user set source = 'LOCAL' where source is null;
|
Loading…
Reference in New Issue