1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 11:21:29 +00:00

decodeURIComponent email (#5397)

This commit is contained in:
mrwangjianhui
2023-03-11 15:54:03 +08:00
committed by GitHub
parent ac345cf3d4
commit 988bedbdb9
8 changed files with 21 additions and 13 deletions

View File

@@ -24,7 +24,8 @@ class OrgUserProfile extends Component {
} }
componentDidMount() { componentDidMount() {
seafileAPI.orgAdminGetOrgUserInfo(orgID, this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.orgAdminGetOrgUserInfo(orgID, email).then((res) => {
this.setState(Object.assign({ this.setState(Object.assign({
loading: false loading: false
}, res.data)); }, res.data));

View File

@@ -24,7 +24,8 @@ class OrgUserOwnedRepos extends Component {
} }
componentDidMount() { componentDidMount() {
seafileAPI.orgAdminGetOrgUserOwnedRepos(orgID, this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.orgAdminGetOrgUserOwnedRepos(orgID, email).then((res) => {
this.setState(Object.assign({ this.setState(Object.assign({
loading: false loading: false
}, res.data)); }, res.data));

View File

@@ -22,7 +22,8 @@ class OrgUserSharedRepos extends Component {
} }
componentDidMount() { componentDidMount() {
seafileAPI.orgAdminGetOrgUserBesharedRepos(orgID, this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.orgAdminGetOrgUserBesharedRepos(orgID, email).then((res) => {
this.setState(Object.assign({ this.setState(Object.assign({
loading: false loading: false
}, res.data)); }, res.data));

View File

@@ -156,12 +156,13 @@ class Groups extends Component {
} }
componentDidMount () { componentDidMount () {
seafileAPI.sysAdminGetUser(this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.sysAdminGetUser(email).then((res) => {
this.setState({ this.setState({
userInfo: res.data userInfo: res.data
}); });
}); });
seafileAPI.sysAdminListGroupsJoinedByUser(this.props.email).then(res => { seafileAPI.sysAdminListGroupsJoinedByUser(email).then(res => {
this.setState({ this.setState({
loading: false, loading: false,
items: res.data.group_list items: res.data.group_list

View File

@@ -238,7 +238,8 @@ class User extends Component {
componentDidMount () { componentDidMount () {
// avatar size: 160 // avatar size: 160
seafileAPI.sysAdminGetUser(this.props.email, 160).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.sysAdminGetUser(email, 160).then((res) => {
this.setState({ this.setState({
loading: false, loading: false,
userInfo: res.data userInfo: res.data

View File

@@ -231,13 +231,14 @@ class Links extends Component {
} }
componentDidMount () { componentDidMount () {
seafileAPI.sysAdminGetUser(this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.sysAdminGetUser(email).then((res) => {
this.setState({ this.setState({
userInfo: res.data userInfo: res.data
}); });
}); });
seafileAPI.sysAdminListShareLinksByUser(this.props.email).then(res => { seafileAPI.sysAdminListShareLinksByUser(email).then(res => {
const items = res.data.share_link_list.map(item => { const items = res.data.share_link_list.map(item => {
item.type = 'download'; item.type = 'download';
return item; return item;
@@ -250,7 +251,7 @@ class Links extends Component {
shareLinkItems: items shareLinkItems: items
}); });
}); });
seafileAPI.sysAdminListUploadLinksByUser(this.props.email).then(res => { seafileAPI.sysAdminListUploadLinksByUser(email).then(res => {
const items = res.data.upload_link_list.map(item => { const items = res.data.upload_link_list.map(item => {
item.type = 'upload'; item.type = 'upload';
return item; return item;

View File

@@ -236,12 +236,13 @@ class Repos extends Component {
} }
componentDidMount () { componentDidMount () {
seafileAPI.sysAdminGetUser(this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.sysAdminGetUser(email).then((res) => {
this.setState({ this.setState({
userInfo: res.data userInfo: res.data
}); });
}); });
seafileAPI.sysAdminListReposByOwner(this.props.email).then(res => { seafileAPI.sysAdminListReposByOwner(email).then(res => {
this.setState({ this.setState({
loading: false, loading: false,
repoList: res.data.repos repoList: res.data.repos

View File

@@ -123,12 +123,13 @@ class Repos extends Component {
} }
componentDidMount () { componentDidMount () {
seafileAPI.sysAdminGetUser(this.props.email).then((res) => { const email = decodeURIComponent(this.props.email);
seafileAPI.sysAdminGetUser(email).then((res) => {
this.setState({ this.setState({
userInfo: res.data userInfo: res.data
}); });
}); });
seafileAPI.sysAdminListShareInRepos(this.props.email).then(res => { seafileAPI.sysAdminListShareInRepos(email).then(res => {
this.setState({ this.setState({
loading: false, loading: false,
repoList: res.data.repo_list repoList: res.data.repo_list