统一角色体系为admin/agent/user,修复代理查询角色错误,添加语言切换和明暗切换
This commit is contained in:
@@ -70,7 +70,7 @@ func (s *AuthService) Login(username, password, agentPath string) (map[string]in
|
||||
|
||||
// Register 用户注册
|
||||
func (s *AuthService) Register(username, email, password string) error {
|
||||
return s.RegisterWithRole(username, email, "", password, "developer")
|
||||
return s.RegisterWithRole(username, email, "", password, "admin")
|
||||
}
|
||||
|
||||
// RegisterWithRole 用户注册(带角色)
|
||||
@@ -115,7 +115,7 @@ func (s *AuthService) RegisterWithRole(username, email, phone, password, role st
|
||||
}
|
||||
|
||||
if role == "" {
|
||||
role = "developer"
|
||||
role = "admin"
|
||||
}
|
||||
|
||||
user := model.User{
|
||||
|
||||
Reference in New Issue
Block a user