Add Properties to user.

This commit is contained in:
Yang Luo
2021-05-30 15:13:43 +08:00
parent badd75b894
commit dc89f2b0f6
5 changed files with 44 additions and 9 deletions

View File

@ -44,7 +44,7 @@ class UserListPage extends React.Component {
newUser() {
return {
owner: "admin", // this.props.account.username,
owner: "built-in", // this.props.account.username,
name: `user_${this.state.users.length}`,
createdTime: moment().format(),
type: "normal-user",
@ -58,6 +58,7 @@ class UserListPage extends React.Component {
isAdmin: false,
isGlobalAdmin: false,
IsForbidden: false,
properties: {},
}
}

View File

@ -68,18 +68,22 @@ class AuthCallback extends React.Component {
UNSAFE_componentWillMount() {
const params = new URLSearchParams(this.props.location.search);
const code = params.get("code");
const innerParams = this.getInnerParams();
const applicationName = innerParams.get("application");
const providerName = innerParams.get("provider");
const method = innerParams.get("method");
let redirectUri = `${window.location.origin}/callback`;
const body = {
type: this.getResponseType(),
application: applicationName,
provider: providerName,
code: params.get("code"),
code: code,
// state: innerParams.get("state"),
state: innerParams.get("application"),
state: applicationName,
redirectUri: redirectUri,
method: method,
};