mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 19:37:28 +00:00
modify sysadmin org api name (#4180)
This commit is contained in:
@@ -134,12 +134,12 @@ class OrgGroups extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
orgName: res.data.org_name
|
orgName: res.data.org_name
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
seafileAPI.sysAdminListAllOrgGroups(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminListOrgGroups(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
groupList: res.data.group_list
|
groupList: res.data.group_list
|
||||||
|
@@ -121,7 +121,7 @@ class OrgInfo extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
orgInfo: res.data
|
orgInfo: res.data
|
||||||
@@ -151,7 +151,7 @@ class OrgInfo extends Component {
|
|||||||
|
|
||||||
updateQuota = (quota) => {
|
updateQuota = (quota) => {
|
||||||
const data = {quota: quota};
|
const data = {quota: quota};
|
||||||
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
|
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
|
||||||
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
||||||
quota: res.data.quota
|
quota: res.data.quota
|
||||||
});
|
});
|
||||||
@@ -165,7 +165,7 @@ class OrgInfo extends Component {
|
|||||||
|
|
||||||
updateName = (orgName) => {
|
updateName = (orgName) => {
|
||||||
const data = {orgName: orgName};
|
const data = {orgName: orgName};
|
||||||
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
|
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
|
||||||
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
||||||
org_name: res.data.org_name
|
org_name: res.data.org_name
|
||||||
});
|
});
|
||||||
@@ -179,7 +179,7 @@ class OrgInfo extends Component {
|
|||||||
|
|
||||||
updateMaxUserNumber = (newValue) => {
|
updateMaxUserNumber = (newValue) => {
|
||||||
const data = {maxUserNumber: newValue};
|
const data = {maxUserNumber: newValue};
|
||||||
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
|
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
|
||||||
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
const newOrgInfo = Object.assign(this.state.orgInfo, {
|
||||||
max_user_number: res.data.max_user_number
|
max_user_number: res.data.max_user_number
|
||||||
});
|
});
|
||||||
|
@@ -138,12 +138,12 @@ class OrgRepos extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
orgName: res.data.org_name
|
orgName: res.data.org_name
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
seafileAPI.sysAdminListAllOrgRepos(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminListOrgRepos(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
repoList: res.data.repo_list
|
repoList: res.data.repo_list
|
||||||
|
@@ -231,12 +231,12 @@ class OrgUsers extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
orgName: res.data.org_name
|
orgName: res.data.org_name
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
seafileAPI.sysAdminListAllOrgUsers(this.props.orgID).then((res) => {
|
seafileAPI.sysAdminListOrgUsers(this.props.orgID).then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
userList: res.data.users
|
userList: res.data.users
|
||||||
@@ -295,7 +295,7 @@ class OrgUsers extends Component {
|
|||||||
|
|
||||||
updateStatus = (email, statusValue) => {
|
updateStatus = (email, statusValue) => {
|
||||||
const isActive = statusValue == 'active';
|
const isActive = statusValue == 'active';
|
||||||
seafileAPI.sysAdminUpdateOrgUserInfo(this.props.orgID, email, 'active', isActive).then(res => {
|
seafileAPI.sysAdminUpdateOrgUser(this.props.orgID, email, 'active', isActive).then(res => {
|
||||||
let newUserList = this.state.userList.map(item => {
|
let newUserList = this.state.userList.map(item => {
|
||||||
if (item.email == email) {
|
if (item.email == email) {
|
||||||
item.active = res.data.active;
|
item.active = res.data.active;
|
||||||
|
@@ -150,7 +150,7 @@ class Orgs extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
seafileAPI.sysAdminListAllOrgs().then((res) => {
|
seafileAPI.sysAdminListOrgs().then((res) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
orgList: res.data.organizations
|
orgList: res.data.organizations
|
||||||
@@ -185,7 +185,7 @@ class Orgs extends Component {
|
|||||||
updateRole = (orgID, role) => {
|
updateRole = (orgID, role) => {
|
||||||
let orgInfo = {};
|
let orgInfo = {};
|
||||||
orgInfo.role = role;
|
orgInfo.role = role;
|
||||||
seafileAPI.sysAdminUpdateOrgInfo(orgID, orgInfo).then(res => {
|
seafileAPI.sysAdminUpdateOrg(orgID, orgInfo).then(res => {
|
||||||
let newOrgList = this.state.orgList.map(org => {
|
let newOrgList = this.state.orgList.map(org => {
|
||||||
if (org.org_id == orgID) {
|
if (org.org_id == orgID) {
|
||||||
org.role = role;
|
org.role = role;
|
||||||
|
Reference in New Issue
Block a user