X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fcomponents%2FEditorForwardingGraph%2FEditForwardingGraphPaths.js;h=e528972d8c3bdcf5c936b06340804b56a7b19cf3;hp=0f39d30a4d57dacc0be51fd5db09f4db793ec3ca;hb=refs%2Ftags%2Fv3.0.0rc2;hpb=f2dc2462571800e62cba969964de621dca09299c diff --git a/skyquake/plugins/composer/src/src/components/EditorForwardingGraph/EditForwardingGraphPaths.js b/skyquake/plugins/composer/src/src/components/EditorForwardingGraph/EditForwardingGraphPaths.js index 0f39d30a4..e528972d8 100644 --- a/skyquake/plugins/composer/src/src/components/EditorForwardingGraph/EditForwardingGraphPaths.js +++ b/skyquake/plugins/composer/src/src/components/EditorForwardingGraph/EditForwardingGraphPaths.js @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -45,6 +45,11 @@ import mapRecordServicePath from './mapRecordServicePath' import onCutDelegateToRemove from './onCutDelegateToRemove' import onClickSelectAndShowInDetailsPanel from './onClickSelectAndShowInDetailsPanel' +import {SkyquakeRBAC, isRBACValid} from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; +import ROLES from 'utils/roleConstants.js'; +const PROJECT_ROLES = ROLES.PROJECT; +const PLATFORM = ROLES.PLATFORM; + import '../../styles/EditForwardingGraphPaths.scss' import imgNSD from '../../images/default-catalog-icon.svg' @@ -119,7 +124,11 @@ function mapFG(fg, i) {
-
}> {fg.title} @@ -133,7 +142,11 @@ function mapFG(fg, i) { {fg.classifier.map(mapClassifier.bind(null, context))}
-
@@ -167,7 +180,11 @@ function mapNSD(nsd, i) { {forwardingGraphs}
-
@@ -193,14 +210,16 @@ const EditForwardingGraphPaths = React.createClass({ }, componentWillUnmount: function () { }, + contextTypes: { + userProfile: React.PropTypes.object + }, render() { - const containers = this.props.containers; const context = { component: this, - containers: containers + containers: containers, + isRBACValid: isRBACValid(this.context.userProfile, [PROJECT_ROLES.PROJECT_ADMIN, PROJECT_ROLES.CATALOG_ADMIN]) }; - const networkService = containers.filter(d => d.type === 'nsd'); if (networkService.length === 0) { return

No NSD open in the canvas. Try opening an NSD.

;