diff --git a/src/AppConfig.js b/src/AppConfig.js index f771b9eab..a55649ce0 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,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 || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index e6aceea36..f1bb1f18f 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -1,7 +1,7 @@ import React, {useEffect} from 'react'; import { WhiteBack } from '../Component/layout'; import './ops.scss'; - +import devops from '../Images/devops.png'; import { Route, Switch } from 'react-router-dom'; import Loadable from 'react-loadable'; import Loading from '../../Loading'; @@ -32,8 +32,7 @@ const Params = Loadable({ }) export default ((props)=>{ - console.log('props', props); - const {jianmu_devops} = props; + const {jianmu_devops, isManager} = props; useEffect(() => { window.addEventListener("message", iframeHeight, false); @@ -44,7 +43,6 @@ export default ((props)=>{ function iframeHeight(e){ - console.log('e',e&&typeof(e.data), e); if (e && e.data && typeof(e.data) === "string") { let myHeight = JSON.parse(e.data); if (document.querySelector("#devopsIframe")) { @@ -65,9 +63,16 @@ export default ((props)=>{ } return( - + {/* 嵌入devops */} - {jianmu_devops && } + {jianmu_devops && isManager && } + {!isManager &&
+
引擎配置
+
+ +
暂无权限,仅仓库管理员可访问
+
+
} {/* 旧引擎页面 */} {/* {/* */}