mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
adjust table acl filtered
This commit is contained in:
parent
2d28c00d0f
commit
f225ee4232
@ -162,8 +162,7 @@ let AccordionListItemTableEditions = React.createClass({
|
||||
new ColumnModel(
|
||||
(item) => {
|
||||
let content = item.acl;
|
||||
if (item.request_action){
|
||||
// TODO should request be translated?
|
||||
if (item.request_action) {
|
||||
content = [item.request_action + ' request'];
|
||||
}
|
||||
return {
|
||||
|
@ -9,12 +9,14 @@ let TableItemAclFiltered = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
var availableAcls = ['consign', 'loan', 'transfer', 'view', 'consign request', 'unconsign request', 'loan request'];
|
||||
var availableAcls = ['acl_consign', 'acl_loan', 'acl_transfer', 'acl_view', 'acl_share', 'acl_unshare'];
|
||||
|
||||
let filteredAcls = this.props.content.filter((v) => {
|
||||
return availableAcls.indexOf(v) > -1;
|
||||
let filteredAcls = Object.keys(this.props.content).filter((key) => {
|
||||
return availableAcls.indexOf(key) > -1 && this.props.content[key];
|
||||
});
|
||||
|
||||
filteredAcls = filteredAcls.map((acl) => acl.split('acl_')[1]);
|
||||
|
||||
return (
|
||||
<span>
|
||||
{filteredAcls.join('/')}
|
||||
|
Loading…
Reference in New Issue
Block a user