diff --git a/src/AppConfig.js b/src/AppConfig.js index 82a5cb78..e271ed76 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -27,7 +27,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '15243705227' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' } function clearAllCookie() { cookie.remove('_educoder_session', { path: '/' }); diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 1ddef304..0247b6b3 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -202,8 +202,7 @@ class Detail extends Component { // 工作流:两种状态进入的链接不同 const pathname = this.props.history.location.pathname; - let p = checkPathname(pathname); - if(p==="devops"){ + if(pathname===`/projects/${owner}/${projectsId}/devops`){ if(result.data.open_devops && pathname === `/projects/${owner}/${projectsId}/devops`){ this.props.history.push(`/projects/${owner}/${projectsId}/devops/list`); }else if(result.data.open_devops===false && pathname !== `/projects/${owner}/${projectsId}/devops`){ diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index 884e0c16..3441b76e 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -26,19 +26,20 @@ class IndexItem extends Component { projectHref=(link , user_apply_signatures,project_id,is_secret , id)=>{ const { user , showLoginDialog } = this.props; - if(user && user.login){ - let signa = user_apply_signatures && user_apply_signatures[0]; - if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){ - this.setState({ - visible:true, - user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined, - project_id - }) - }else{ - this.props.history.push(link); - } + debugger; + if(is_secret && (!user || (user && !user.login))){ + showLoginDialog(); + return; + } + let signa = user_apply_signatures && user_apply_signatures[0]; + if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){ + this.setState({ + visible:true, + user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined, + project_id + }) }else{ - showLoginDialog && showLoginDialog(); + this.props.history.push(link); } } hideModal=()=>{