diff --git a/app/components/App.js b/app/components/App.js index aada5befd903c6a1bd34839109770044be9994e3..12241478a092a590d88c15fd9d0af598862cff8d 100644 --- a/app/components/App.js +++ b/app/components/App.js @@ -2,6 +2,7 @@ import React from 'react' import styled from 'styled-components' import { compose } from 'recompose' import { connect } from 'react-redux' +import Authorize from 'pubsweet-client/src/helpers/Authorize' import { withRouter, matchPath } from 'react-router-dom' // import PropTypes from 'prop-types' @@ -36,7 +37,7 @@ const App = ({ }) => { const { pathname } = history.location const showLinks = pathname.match(/submit|manuscript/g) - let links + let links = [] if (showLinks) { const params = getParams(pathname) @@ -62,6 +63,12 @@ const App = ({ : null } + links.push( + <Authorize object={{}} operation="can view teams menu"> + <Action to="/teams">Team Manager</Action> + </Authorize>, + ) + return ( <Root disableLinks={disableLinks}> <AppBar diff --git a/app/routes.js b/app/routes.js index 9bc1f22f92fcb5842deda3afb4295af2fd706b99..0412889acf51a7d5d1f0442ed99dd8b239814ecf 100644 --- a/app/routes.js +++ b/app/routes.js @@ -17,6 +17,7 @@ import SubmitPage from 'pubsweet-component-xpub-submit/src/components/SubmitPage import ManuscriptPage from 'pubsweet-component-xpub-manuscript/src/components/ManuscriptPage' import ReviewersPage from 'pubsweet-component-xpub-review/src/components/ReviewersPage' import ReviewPage from 'pubsweet-component-xpub-review/src/components/ReviewPage' +import TeamPage from 'pubsweet-component-xpub-teams-manager/src/components/TeamsManagerPage' import DecisionPage from 'pubsweet-component-xpub-review/src/components/DecisionPage' import UsersManager from 'pubsweet-component-users-manager/src/UsersManagerContainer' @@ -46,6 +47,7 @@ const Routes = () => ( exact path="/projects/:project/versions/:version/submit" /> + <PrivateRoute component={TeamPage} exact path="/teams" /> <PrivateRoute component={ManuscriptPage} exact