引擎-权限-非报告者即可

This commit is contained in:
caishi 2022-02-10 16:00:54 +08:00
parent 882f0760e8
commit d8384ab4bd
1 changed files with 5 additions and 5 deletions

View File

@ -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) {
<img src={activate} alt="" width="250px" />
<P>定义DevOps工作流帮助您检测bug发布代码</P>
{
CurrentLogin !== AuthorLogin ?
!isPermission ?
<div className="noOperation">DevOps开启功能暂未对项目创建者以外的角色开放可以联系项目创建者进行开启开启后便可查看构建信息</div>:""
}
<a href={"https://forum.trustie.net/forums/3110/detail"} target="_blank" style={{ color: "#5091FF"}}>
@ -177,7 +177,7 @@ function About(props, ref) {
如何使用引擎Engine功能
</a>
{
AuthorLogin === CurrentLogin ?
isPermission ?
<React.Fragment>
{
step === 0 && !typeFlag ?