forked from Gitlink/forgeplus-react
引擎-权限-非报告者即可
This commit is contained in:
parent
882f0760e8
commit
d8384ab4bd
|
@ -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 ?
|
||||
|
|
Loading…
Reference in New Issue