mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Add User's IsForbidden.
This commit is contained in:
@ -364,6 +364,16 @@ class UserEditPage extends React.Component {
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("user:Is forbidden")}:
|
||||
</Col>
|
||||
<Col span={1} >
|
||||
<Switch checked={this.state.user.isForbidden} onChange={checked => {
|
||||
this.updateUserField('isForbidden', checked);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ class UserListPage extends React.Component {
|
||||
dataIndex: 'isAdmin',
|
||||
key: 'isAdmin',
|
||||
width: '120px',
|
||||
sorter: (a, b) => a.isAdmin.localeCompare(b.isAdmin),
|
||||
sorter: (a, b) => a.isAdmin - b.isAdmin,
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
@ -223,7 +223,19 @@ class UserListPage extends React.Component {
|
||||
dataIndex: 'isGlobalAdmin',
|
||||
key: 'isGlobalAdmin',
|
||||
width: '120px',
|
||||
sorter: (a, b) => a.isGlobalAdmin.localeCompare(b.isGlobalAdmin),
|
||||
sorter: (a, b) => a.isGlobalAdmin - b.isGlobalAdmin,
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: i18next.t("user:Is forbidden"),
|
||||
dataIndex: 'isForbidden',
|
||||
key: 'isForbidden',
|
||||
width: '120px',
|
||||
sorter: (a, b) => a.isForbidden - b.isForbidden,
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
|
@ -94,7 +94,8 @@
|
||||
"Link": "Link",
|
||||
"Unlink": "Unlink",
|
||||
"Is admin": "Is admin",
|
||||
"Is global admin": "Is global admin"
|
||||
"Is global admin": "Is global admin",
|
||||
"Is forbidden": "Is forbidden"
|
||||
},
|
||||
"application":
|
||||
{
|
||||
|
@ -96,7 +96,8 @@
|
||||
"Link": "绑定",
|
||||
"Unlink": "解绑",
|
||||
"Is admin": "是管理员",
|
||||
"Is global admin": "是全局管理员"
|
||||
"Is global admin": "是全局管理员",
|
||||
"Is forbidden": "被禁用"
|
||||
},
|
||||
"application":
|
||||
{
|
||||
|
Reference in New Issue
Block a user