edit descriptor model for composer rbac fix
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 18 Apr 2017 18:31:50 +0000 (14:31 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 18 Apr 2017 18:31:50 +0000 (14:31 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/composer/src/src/components/CatalogItemDetailsEditor.js
skyquake/plugins/composer/src/src/components/DetailsPanel.js
skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js

index fe47521..484e936 100644 (file)
@@ -72,9 +72,4 @@ const CatalogItemDetailsEditor = React.createClass({
 
        }
 });
-
-CatalogItemDetailsEditor.contextTypes = {
-    router: React.PropTypes.object,
-    userProfile: React.PropTypes.object
-};
 export default CatalogItemDetailsEditor;
index 7af2ad1..37fc17b 100644 (file)
@@ -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;
index e75f3cd..65712f4 100644 (file)
@@ -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);