diff --git a/object/user.go b/object/user.go
index 8ef42dc3..5d7f4bce 100644
--- a/object/user.go
+++ b/object/user.go
@@ -31,6 +31,8 @@ type User struct {
Avatar string `xorm:"varchar(100)" json:"avatar"`
Email string `xorm:"varchar(100)" json:"email"`
Phone string `xorm:"varchar(100)" json:"phone"`
+ Affiliation string `xorm:"varchar(100)" json:"affiliation"`
+ IsAdmin bool `json:"isAdmin"`
Github string `xorm:"varchar(100)" json:"github"`
}
diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js
index d65ebf6c..de5ac626 100644
--- a/web/src/ApplicationEditPage.js
+++ b/web/src/ApplicationEditPage.js
@@ -157,9 +157,9 @@ class ApplicationEditPage extends React.Component {
Enable Password:
- {
- {this.updateApplicationField('enablePassword', checked);})} />
- }
+ {
+ this.updateApplicationField('enablePassword', checked);
+ }} />
diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js
index faeacb05..56966e10 100644
--- a/web/src/UserEditPage.js
+++ b/web/src/UserEditPage.js
@@ -13,7 +13,7 @@
// limitations under the License.
import React from "react";
-import {Button, Card, Col, Input, Row, Select} from 'antd';
+import {Button, Card, Col, Input, Row, Select, Switch} from 'antd';
import * as UserBackend from "./backend/UserBackend";
import * as OrganizationBackend from "./backend/OrganizationBackend";
import * as Setting from "./Setting";
@@ -188,6 +188,26 @@ class UserEditPage extends React.Component {
}} />
+
+
+ Affiliation:
+
+
+ {
+ this.updateUserField('affiliation', e.target.value);
+ }} />
+
+
+
+
+ Is Admin:
+
+
+ {
+ this.updateUserField('isAdmin', checked);
+ }} />
+
+
)
}
diff --git a/web/src/UserListPage.js b/web/src/UserListPage.js
index 90a2ec63..9cff309f 100644
--- a/web/src/UserListPage.js
+++ b/web/src/UserListPage.js
@@ -14,7 +14,7 @@
import React from "react";
import {Link} from "react-router-dom";
-import {Button, Col, Popconfirm, Row, Table} from 'antd';
+import {Button, Col, Popconfirm, Row, Switch, Table} from 'antd';
import moment from "moment";
import * as Setting from "./Setting";
import * as UserBackend from "./backend/UserBackend";
@@ -131,13 +131,13 @@ class UserListPage extends React.Component {
width: '150px',
sorter: (a, b) => a.passwordType.localeCompare(b.passwordType),
},
- {
- title: 'Password',
- dataIndex: 'password',
- key: 'password',
- width: '150px',
- sorter: (a, b) => a.password.localeCompare(b.password),
- },
+ // {
+ // title: 'Password',
+ // dataIndex: 'password',
+ // key: 'password',
+ // width: '150px',
+ // sorter: (a, b) => a.password.localeCompare(b.password),
+ // },
{
title: 'Display Name',
dataIndex: 'displayName',
@@ -179,6 +179,25 @@ class UserListPage extends React.Component {
width: '120px',
sorter: (a, b) => a.phone.localeCompare(b.phone),
},
+ {
+ title: 'Affiliation',
+ dataIndex: 'affiliation',
+ key: 'affiliation',
+ width: '120px',
+ sorter: (a, b) => a.affiliation.localeCompare(b.affiliation),
+ },
+ {
+ title: 'Is Admin',
+ dataIndex: 'isAdmin',
+ key: 'isAdmin',
+ width: '120px',
+ sorter: (a, b) => a.isAdmin.localeCompare(b.isAdmin),
+ render: (text, record, index) => {
+ return (
+
+ )
+ }
+ },
{
title: 'Action',
dataIndex: '',