X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordCard.jsx;h=7b3cb2188f246b60d50b159967e718fcc647177c;hp=88ff709a44c52e7e0f5939a56843f5a50ac22593;hb=8a3927012ae0fc7e136612682a5641b7ba0af567;hpb=64b803dbd876e15a0a2d4ca46d8ce81ac18915f6 diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index 88ff709a4..7b3cb2188 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -36,6 +36,10 @@ import LaunchpadFleetStore from '../launchpadFleetStore.js'; import Prism from 'prismjs'; import 'prismjs/themes/prism.css'; +import {SkyquakeRBAC, isRBACValid} from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; +import ROLES from 'utils/roleConstants.js'; + +const PROJECT_ROLES = ROLES.PROJECT; export default class RecordCard extends React.Component { constructor(props) { @@ -77,6 +81,8 @@ export default class RecordCard extends React.Component { let notice = null; + let hasAccess = isRBACValid(this.context.userProfile, [PROJECT_ROLES.LCM_ADMIN]); + switch(this.props.type) { case 'vnfr' : cardData = this.props.data[0]; @@ -86,7 +92,7 @@ export default class RecordCard extends React.Component { if (displayConfigPrimitives) { configPrimitiveComponent = (
- + {/* */}
@@ -419,3 +425,7 @@ RecordCard.defaultProps = { isLoading: true, jobData: [] } +RecordCard.contextTypes = { + router: React.PropTypes.object, + userProfile: React.PropTypes.object +};