Add PasswordSalt to org.

This commit is contained in:
Yang Luo
2021-05-05 23:40:18 +08:00
parent f442f11568
commit 8a4311c85c
10 changed files with 28 additions and 21 deletions

View File

@ -139,6 +139,16 @@ class OrganizationEditPage extends React.Component {
</Select>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Password salt")}:
</Col>
<Col span={22} >
<Input value={this.state.organization.passwordSalt} onChange={e => {
this.updateOrganizationField('passwordSalt', e.target.value);
}} />
</Col>
</Row>
</Card>
)
}

View File

@ -50,6 +50,8 @@ class OrganizationListPage extends React.Component {
displayName: `New Organization - ${this.state.organizations.length}`,
websiteUrl: "https://door.casbin.com",
favicon: "https://cdn.casbin.com/static/favicon.ico",
passwordType: "plain",
PasswordSalt: "",
}
}
@ -149,6 +151,13 @@ class OrganizationListPage extends React.Component {
width: '150px',
sorter: (a, b) => a.passwordType.localeCompare(b.passwordType),
},
{
title: i18next.t("general:Password salt"),
dataIndex: 'passwordSalt',
key: 'passwordSalt',
width: '150px',
sorter: (a, b) => a.passwordSalt.localeCompare(b.passwordSalt),
},
{
title: i18next.t("general:Action"),
dataIndex: '',

View File

@ -49,7 +49,6 @@ class UserListPage extends React.Component {
createdTime: moment().format(),
type: "normal-user",
password: "123",
passwordType: "plain",
displayName: `New User - ${this.state.users.length}`,
avatar: "https://casbin.org/img/casbin.svg",
email: "user@example.com",
@ -58,6 +57,8 @@ class UserListPage extends React.Component {
affiliation: "Example Inc.",
tag: "staff",
isAdmin: false,
isGlobalAdmin: false,
IsForbidden: false,
}
}

View File

@ -20,6 +20,7 @@
"Preview": "Preview",
"User type": "User type",
"Password type": "Password type",
"Password salt": "Password salt",
"Password": "Password",
"Email": "Email",
"Phone": "Phone",

View File

@ -20,6 +20,7 @@
"Preview": "预览",
"User type": "用户类型",
"Password type": "密码类型",
"Password salt": "密码Salt值",
"Password": "密码",
"Email": "电子邮箱",
"Phone": "手机号",