1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-05 11:25:09 +01:00

Revert changes to allow piece list to filter ACLs

We can do this with the backend instead.
This commit is contained in:
Brett Sun 2015-10-26 11:09:04 +01:00
parent 3dedc93d2e
commit 84c459c426
3 changed files with 2 additions and 17 deletions

View File

@ -22,16 +22,9 @@ import { getLangText } from '../../utils/lang_utils.js';
let PieceListBulkModal = React.createClass({ let PieceListBulkModal = React.createClass({
propTypes: { propTypes: {
aclFilterBy: React.PropTypes.func,
className: React.PropTypes.string className: React.PropTypes.string
}, },
getDefaultProps() {
return {
aclFilterBy: (aclName) => aclName !== 'acl_view'
};
},
getInitialState() { getInitialState() {
return mergeOptions( return mergeOptions(
EditionListStore.getState(), EditionListStore.getState(),
@ -100,7 +93,7 @@ let PieceListBulkModal = React.createClass({
render() { render() {
let selectedEditions = this.fetchSelectedEditionList(); let selectedEditions = this.fetchSelectedEditionList();
let availableAcls = getAvailableAcls(selectedEditions, this.props.aclFilterBy); let availableAcls = getAvailableAcls(selectedEditions, (aclName) => aclName !== 'acl_view');
if(Object.keys(availableAcls).length > 0) { if(Object.keys(availableAcls).length > 0) {
return ( return (

View File

@ -32,7 +32,6 @@ import { setDocumentTitle } from '../utils/dom_utils';
let PieceList = React.createClass({ let PieceList = React.createClass({
propTypes: { propTypes: {
accordionListItemType: React.PropTypes.func, accordionListItemType: React.PropTypes.func,
aclFilterBy: React.PropTypes.func,
redirectTo: React.PropTypes.string, redirectTo: React.PropTypes.string,
customSubmitButton: React.PropTypes.element, customSubmitButton: React.PropTypes.element,
filterParams: React.PropTypes.array, filterParams: React.PropTypes.array,
@ -179,8 +178,7 @@ let PieceList = React.createClass({
} }
</PieceListToolbar> </PieceListToolbar>
<PieceListBulkModal <PieceListBulkModal
className="ascribe-piece-list-bulk-modal" className="ascribe-piece-list-bulk-modal"/>
aclFilterBy={this.props.aclFilterBy}/>
<PieceListFilterDisplay <PieceListFilterDisplay
filterBy={this.state.filterBy} filterBy={this.state.filterBy}
filterParams={this.props.filterParams}/> filterParams={this.props.filterParams}/>

View File

@ -32,11 +32,6 @@ let LumenusPieceList = React.createClass({
this.setState(state); this.setState(state);
}, },
showOnlyConsignAcl(aclName) {
return aclName === 'acl_consign' ||
aclName === 'acl_unconsign';
},
render() { render() {
setDocumentTitle(getLangText('Collection')); setDocumentTitle(getLangText('Collection'));
@ -44,7 +39,6 @@ let LumenusPieceList = React.createClass({
<div> <div>
<PieceList <PieceList
redirectTo="/register_piece?slide_num=0" redirectTo="/register_piece?slide_num=0"
aclFilterBy={this.showOnlyConsignAcl}
filterParams={[{ filterParams={[{
label: getLangText('Show works I have'), label: getLangText('Show works I have'),
items: [{ items: [{