1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 18:35: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({
propTypes: {
aclFilterBy: React.PropTypes.func,
className: React.PropTypes.string
},
getDefaultProps() {
return {
aclFilterBy: (aclName) => aclName !== 'acl_view'
};
},
getInitialState() {
return mergeOptions(
EditionListStore.getState(),
@ -100,7 +93,7 @@ let PieceListBulkModal = React.createClass({
render() {
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) {
return (

View File

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

View File

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