feat: hide registration-related options when allowRegistration is disabled (#5690)

#### What type of PR is this?

/kind improvement
/area core

#### Which issue(s) this PR fixes:

Fixes #5688 

```release-note
当未开启允许注册选项时,隐藏注册相关的其他选项。
```
pull/5697/head
mashirot 2024-04-12 17:04:07 +08:00 committed by GitHub
parent 817963c15e
commit 0ebb959c45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -97,16 +97,21 @@ spec:
formSchema:
- $formkit: checkbox
name: allowRegistration
id: allowRegistration
key: allowRegistration
label: "开放注册"
value: false
- $formkit: checkbox
name: mustVerifyEmailOnRegistration
label: "注册需验证邮箱"
if: "$get(allowRegistration).value === true"
help: "需要确保已经正确配置邮件通知器"
value: false
- $formkit: roleSelect
name: defaultRole
label: "默认角色"
validation: 'required'
if: "$get(allowRegistration).value === true"
help: 用户注册之后默认为用户分配的角色
- $formkit: attachmentPolicySelect
name: avatarPolicy