ci: add password complexity options to organization edit page (#1949)

* Support uploading roles and permissions via xlsx file.

* Template xlsx file for uploading users and permissions.

* reformat according to gofumpt.

* fix typo.

* add password complexity options to organization edit page.

* add password complexity options to organization edit page.

* Fixed Typos.

* Fixed Typos.

* feat:add password complexity options to organization edit page

* Auto generate i18n fields.

* Refactor code according to instructions

* Support autocheck passwd complexity in frontend when setting passwd in user edit page.

* feat:Backend Support for password validation in signup and forget page.

* feat:Frontend Support for password validation in signup and forget page.

* Add default password complex option & Update historical empty filed with default option.

* Migrator for field `password_complex_options` in org table.

* feat: support frontend password complex option check in user_edit/forget/signup page.

* frontend update for user edit page

* update i18n file

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
leoil
2023-06-17 00:01:20 +08:00
committed by Yang Luo
parent edc6aa0d50
commit 0f57ac297b
24 changed files with 420 additions and 24 deletions

View File

@ -193,6 +193,29 @@ class OrganizationEditPage extends React.Component {
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}}>
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Password complexity options"), i18next.t("general:Password complexity options - Tooltip"))} :
</Col>
<Col span={22} >
<Select
virtual={false}
style={{width: "100%"}}
mode="multiple"
value={this.state.organization.passwordOptions}
onChange={(value => {
this.updateOrganizationField("passwordOptions", value);
})}
options={[
{value: "AtLeast6", name: i18next.t("user:The password must have at least 6 characters")},
{value: "AtLeast8", name: i18next.t("user:The password must have at least 8 characters")},
{value: "Aa123", name: i18next.t("user:The password must contain at least one uppercase letter, one lowercase letter and one digit")},
{value: "SpecialChar", name: i18next.t("user:The password must contain at least one special character")},
{value: "NoRepeat", name: i18next.t("user:The password must not contain any repeated characters")},
].map((item) => Setting.getOption(item.name, item.value))}
/>
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Supported country codes"), i18next.t("general:Supported country codes - Tooltip"))} :