mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
feat: add deletedTime to user (#2652)
This commit is contained in:
@ -1448,7 +1448,7 @@ export function getFriendlyUserName(account) {
|
||||
}
|
||||
|
||||
export function getUserCommonFields() {
|
||||
return ["Owner", "Name", "CreatedTime", "UpdatedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar",
|
||||
return ["Owner", "Name", "CreatedTime", "UpdatedTime", "DeletedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar",
|
||||
"Email", "EmailVerified", "Phone", "Location", "Address", "Affiliation", "Title", "IdCardType", "IdCard", "Homepage", "Bio", "Tag", "Region",
|
||||
"Language", "Gender", "Birthday", "Education", "Score", "Ranking", "IsDefaultAvatar", "IsOnline", "IsAdmin", "IsForbidden", "IsDeleted", "CreatedIp",
|
||||
"PreferredMfaType", "TotpSecret", "SignupApplication"];
|
||||
|
@ -27,6 +27,7 @@ import * as ApplicationBackend from "./backend/ApplicationBackend";
|
||||
import PasswordModal from "./common/modal/PasswordModal";
|
||||
import ResetModal from "./common/modal/ResetModal";
|
||||
import AffiliationSelect from "./common/select/AffiliationSelect";
|
||||
import moment from "moment";
|
||||
import OAuthWidget from "./common/OAuthWidget";
|
||||
import SamlWidget from "./common/SamlWidget";
|
||||
import RegionSelect from "./common/select/RegionSelect";
|
||||
@ -869,6 +870,7 @@ class UserEditPage extends React.Component {
|
||||
<Col span={(Setting.isMobile()) ? 22 : 2} >
|
||||
<Switch checked={this.state.user.isDeleted} onChange={checked => {
|
||||
this.updateUserField("isDeleted", checked);
|
||||
this.updateUserField("deletedTime", checked ? moment().format() : "");
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -62,6 +62,7 @@ const userTemplate = {
|
||||
"name": "admin",
|
||||
"createdTime": "2020-07-16T21:46:52+08:00",
|
||||
"updatedTime": "",
|
||||
"deletedTime": "",
|
||||
"id": "9eb20f79-3bb5-4e74-99ac-39e3b9a171e8",
|
||||
"type": "normal-user",
|
||||
"password": "***",
|
||||
|
Reference in New Issue
Block a user