You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the current default administrator account and password are hard-coded, login authorization is useless. It is recommended to obtain it from docker env instead.
you can make this:
ADMIN("ADMIN", 2L, "chat2db", "chat2db"),
Change to this:
ADMIN("ADMIN", 2L, System.getenv().getOrDefault("ADMIN_NAME", "chat2db"), System.getenv().getOrDefault("ADMIN_PASS", "chat2db")),
miahemu
changed the title
建议: docker版本的默认用户名和密码从env中获取
Suggestion: The default username and password of the docker version are obtained from env
May 18, 2024
Since the current default administrator account and password are hard-coded, login authorization is useless. It is recommended to obtain it from docker env instead.
Relevant code:
package ai.chat2db.server.domain.api.enums;
import ai.chat2db.server.tools.base.enums.BaseEnum;
import lombok.Getter;
/**
role code
@author Jiaju Zhuang
/
@Getter
public enum RoleCodeEnum implements BaseEnum {
/*
*/
DESKTOP("DESKTOP", 1L, "_desktop_default_user_name", "_desktop_default_user_name"),
/**
*/
ADMIN("ADMIN", 2L, "chat2db", "chat2db"),
/**
*/
USER("USER", null, null, null),
;
final String description;
final Long defaultUserId;
final String userName;
final String password;
RoleCodeEnum(String description, Long defaultUserId, String userName, String password) {
this.description = description;
this.defaultUserId = defaultUserId;
this.userName = userName;
this.password = password;
}
@OverRide
public String getCode() {
return this.name();
}
}
The text was updated successfully, but these errors were encountered: