Skip to content

Commit

Permalink
[Bug] Fix: Set a default password for Ldap user (#3955)
Browse files Browse the repository at this point in the history
* set default password

* modify constant name

---------

Co-authored-by: hechao <[email protected]>
  • Loading branch information
ShawHee and hechao authored Aug 9, 2024
1 parent e4cc7ef commit 47ba863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class User extends BaseEntity {

public static final Integer DEFAULT_PASSWORD_LENGTH = 8;

public static final String DEFAULT_SECRET = "streampark";

@TableId(type = IdType.AUTO)
private Long userId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ private User newUserCreate(LoginTypeEnum loginTypeEnum, String username) throws
newUser.setUserType(UserTypeEnum.USER);
newUser.setStatus(User.STATUS_VALID);
newUser.setSex(User.SEX_UNKNOWN);
newUser.setPassword(User.DEFAULT_SECRET);
usersService.createUser(newUser);
return newUser;
}
Expand Down

0 comments on commit 47ba863

Please sign in to comment.