Skip to content
Snippets Groups Projects
Commit 299c7230 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(dashboard-page): get handling editors only for admins and eics

parent b1bc968a
No related branches found
No related tags found
No related merge requests found
...@@ -10,16 +10,11 @@ import { newestFirst, selectCurrentUser } from 'xpub-selectors' ...@@ -10,16 +10,11 @@ import { newestFirst, selectCurrentUser } from 'xpub-selectors'
import { createDraftSubmission } from 'pubsweet-component-wizard/src/redux/conversion' import { createDraftSubmission } from 'pubsweet-component-wizard/src/redux/conversion'
import Dashboard from './Dashboard' import Dashboard from './Dashboard'
import { getHandlingEditors } from '../../redux/editors'
import withFilters from './withFilters' import withFilters from './withFilters'
import { getHandlingEditors } from '../../redux/editors'
export default compose( export default compose(
ConnectPage(() => [ ConnectPage(() => [actions.getCollections()]),
actions.getCollections(),
actions.getTeams(),
actions.getUsers(),
getHandlingEditors(),
]),
connect( connect(
state => { state => {
const { collections, conversion } = state const { collections, conversion } = state
...@@ -50,6 +45,12 @@ export default compose( ...@@ -50,6 +45,12 @@ export default compose(
createDraftSubmission: () => dispatch(createDraftSubmission(history)), createDraftSubmission: () => dispatch(createDraftSubmission(history)),
}), }),
), ),
ConnectPage(
({ currentUser }) =>
get(currentUser, 'admin') || get(currentUser, 'editorInChief')
? [getHandlingEditors()]
: [],
),
withRouter, withRouter,
withJournal, withJournal,
withFilters({ withFilters({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment