From 8b1b61031a76bd72fd9aab3cc8ab066d8876f494 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 6 Jul 2021 14:39:01 +0800 Subject: [PATCH] =?UTF-8?q?permission=E6=9C=89=E4=B8=BA=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/CoderDepot.jsx | 2 +- src/modules/tpm/TPMIndexHOC.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 271aecab..aa5d4168 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -255,7 +255,7 @@ function CoderDepot(props){ const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; const { current_user } = props; - const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin)); + const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin)); return( setOpenModal(false)} onOk={okUpdate}/> diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 271afff9..a3d5f42f 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -154,9 +154,6 @@ export function TPMIndexHOC(WrappedComponent) { this.setState({ tpmLoading: false }) - if (this.props.match.path === "/" && response.data.login) { - this.props.history.push(`/users/${response.data.login}`); - } if(response.data && response.data.login){ if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){ this.setState({