From d8384ab4bdcec926f54cfda906b8b7d57e6aa44c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 10 Feb 2022 16:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E6=93=8E-=E6=9D=83=E9=99=90-=E9=9D=9E?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E8=80=85=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/DevOps/About.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index ec0a7f6d5..4831f73bc 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -36,15 +36,15 @@ function About(props, ref) { const [ disabled, setDisabled ] = useState(false); const [ typeFlag, setTypeFlag] = useState(false); - const AuthorLogin = props.projectDetail && props.projectDetail.author && props.projectDetail.author.login; + const isPermission = props.projectDetail && props.projectDetail.permission && props.projectDetail.permission!=="Reporter"; const CurrentLogin = props.current_user && props.current_user.login; useEffect(()=>{ - if(CurrentLogin === AuthorLogin){ + if(isPermission){ auth('get'); }else{ setIsSpining(false); } - },[AuthorLogin,CurrentLogin]) + },[isPermission,CurrentLogin]) function auth(type){ const url = `/${owner}/${projectsId}/ci_authorize.json`; @@ -167,7 +167,7 @@ function About(props, ref) {

定义DevOps工作流,帮助您检测bug、发布代码…

{ - CurrentLogin !== AuthorLogin ? + !isPermission ?
DevOps开启功能暂未对项目创建者以外的角色开放,可以联系项目创建者进行开启,开启后便可查看构建信息。
:"" } @@ -177,7 +177,7 @@ function About(props, ref) { 如何使用引擎(Engine)功能? { - AuthorLogin === CurrentLogin ? + isPermission ? { step === 0 && !typeFlag ?