diff --git a/lib/editor/components/EditorFeedSourcePanel.js b/lib/editor/components/EditorFeedSourcePanel.js index ef1f0caa2..07d7ec31a 100644 --- a/lib/editor/components/EditorFeedSourcePanel.js +++ b/lib/editor/components/EditorFeedSourcePanel.js @@ -45,8 +45,12 @@ export default class EditorFeedSourcePanel extends Component { render () { const { - feedSource + feedSource, + project, + user } = this.props + const disabled = !user.permissions.hasFeedPermission(project.organizationId, project.id, feedSource.id, 'manage-feed') + const editDisabled = !user.permissions.hasFeedPermission(project.organizationId, project.id, feedSource.id, 'edit-gtfs') const hasVersions = feedSource && feedSource.feedVersions && feedSource.feedVersions.length > 0 const currentSnapshot = feedSource.editorSnapshots && feedSource.editorSnapshots.length ? feedSource.editorSnapshots.find(s => s.current) @@ -68,6 +72,7 @@ export default class EditorFeedSourcePanel extends Component { ? @@ -82,7 +87,12 @@ export default class EditorFeedSourcePanel extends Component { ? No other snapshots : inactiveSnapshots.map(s => { return ( - + ) }) } @@ -110,6 +120,7 @@ export default class EditorFeedSourcePanel extends Component { @@ -117,6 +128,7 @@ export default class EditorFeedSourcePanel extends Component { diff --git a/lib/editor/containers/ActiveEditorFeedSourcePanel.js b/lib/editor/containers/ActiveEditorFeedSourcePanel.js index a3ba375f7..2247d8104 100644 --- a/lib/editor/containers/ActiveEditorFeedSourcePanel.js +++ b/lib/editor/containers/ActiveEditorFeedSourcePanel.js @@ -5,7 +5,10 @@ import { createFeedVersionFromSnapshot } from '../../manager/actions/versions' import EditorFeedSourcePanel from '../components/EditorFeedSourcePanel' const mapStateToProps = (state, ownProps) => { - return {} + const {user} = state + return { + user + } } const mapDispatchToProps = {