feat(auth): 添加用户注册开关功能
- 在系统设置中新增 allowRegister 配置项控制用户注册 - 实现注册接口的开关检查机制 - 登录页面根据注册开关动态显示或隐藏注册选项 - 首次 Linux.do 登录创建用户时也受注册开关限制 - 更新系统配置文档说明新的认证配置项
This commit is contained in:
@@ -78,6 +78,10 @@ func normalizePublicSetting(setting model.PublicSetting) model.PublicSetting {
|
||||
enabled := true
|
||||
setting.ModelChannel.AllowCustomChannel = &enabled
|
||||
}
|
||||
if setting.Auth.AllowRegister == nil {
|
||||
enabled := true
|
||||
setting.Auth.AllowRegister = &enabled
|
||||
}
|
||||
return setting
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user