From: Laurence Maultsby Date: Tue, 18 Apr 2017 18:31:50 +0000 (-0400) Subject: edit descriptor model for composer rbac fix X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3f7d3075ddc01e1f26ecf4fa472189d67a8d9c50;p=osm%2FUI.git edit descriptor model for composer rbac fix Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/composer/src/src/components/CatalogItemDetailsEditor.js b/skyquake/plugins/composer/src/src/components/CatalogItemDetailsEditor.js index fe4752180..484e9364f 100644 --- a/skyquake/plugins/composer/src/src/components/CatalogItemDetailsEditor.js +++ b/skyquake/plugins/composer/src/src/components/CatalogItemDetailsEditor.js @@ -72,9 +72,4 @@ const CatalogItemDetailsEditor = React.createClass({ } }); - -CatalogItemDetailsEditor.contextTypes = { - router: React.PropTypes.object, - userProfile: React.PropTypes.object -}; export default CatalogItemDetailsEditor; diff --git a/skyquake/plugins/composer/src/src/components/DetailsPanel.js b/skyquake/plugins/composer/src/src/components/DetailsPanel.js index 7af2ad148..37fc17bb8 100644 --- a/skyquake/plugins/composer/src/src/components/DetailsPanel.js +++ b/skyquake/plugins/composer/src/src/components/DetailsPanel.js @@ -50,6 +50,10 @@ const DetailsPanel = React.createClass({ }, componentWillUnmount() { }, + contextTypes: { + router: React.PropTypes.object, + userProfile: React.PropTypes.object + }, render() { let json = '{}'; let bodyComponent = messages.detailsWelcome(); @@ -73,9 +77,4 @@ const DetailsPanel = React.createClass({ } }); -DetailsPanel.contextTypes = { - router: React.PropTypes.object, - userProfile: React.PropTypes.object -}; - export default DetailsPanel; diff --git a/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js b/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js index e75f3cd53..65712f43f 100644 --- a/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js +++ b/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js @@ -75,6 +75,8 @@ export default function EditDescriptorModelProperties(props) { const container = props.container; const readonly = props.readonly; + const isEditable = !readonly; //true + if (!(DescriptorModelFactory.isContainer(container))) { return } @@ -184,7 +186,6 @@ export default function EditDescriptorModelProperties(props) { let catalogs = cds.getTransientCatalogs(); const name = path.join('.'); - const isEditable = !readonly; //true const isGuid = Property.isGuid(property); const isBoolean = Property.isBoolean(property); const onChange = onFormFieldValueChanged.bind(container);