X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fframework%2Fwidgets%2Fskyquake_nav%2FskyquakeNav.jsx;h=d9dff0b3931305af8d09f89ff4eb464569f0dce5;hb=cefb13b7e32e68315f5f246ff27010315c830834;hp=1aaaf4d454ce4dfcf341859d9d6424b036c48d9e;hpb=a81c177c80a2428371b00015fbc9e3837f33fea8;p=osm%2FUI.git diff --git a/skyquake/framework/widgets/skyquake_nav/skyquakeNav.jsx b/skyquake/framework/widgets/skyquake_nav/skyquakeNav.jsx index 1aaaf4d45..d9dff0b39 100644 --- a/skyquake/framework/widgets/skyquake_nav/skyquakeNav.jsx +++ b/skyquake/framework/widgets/skyquake_nav/skyquakeNav.jsx @@ -25,10 +25,11 @@ import 'style/common.scss'; import './skyquakeNav.scss'; import SelectOption from '../form_controls/selectOption.jsx'; import {FormSection} from '../form_controls/formControls.jsx'; -import SkyquakeRBAC from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; +import {isRBACValid, SkyquakeRBAC} from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; //Temporary, until api server is on same port as webserver -var rw = require('utils/rw.js'); +import rw from 'utils/rw.js'; + var API_SERVER = rw.getSearchParams(window.location).api_server; var UPLOAD_SERVER = rw.getSearchParams(window.location).upload_server; @@ -190,6 +191,9 @@ export default class skyquakeNav extends React.Component { skyquakeNav.defaultProps = { nav: {} } +skyquakeNav.contextTypes = { + userProfile: React.PropTypes.object +}; /** * Returns a React Component * @param {object} link Information about the nav link @@ -259,6 +263,7 @@ export function buildNav(nav, currentPlugin, props) { let secondaryNav = []; let adminNav = []; let self = this; + const User = this.context.userProfile; self.hasSubNav = {}; let secondaryNavHTML = (