mirror of
https://github.com/ascribe/onion.git
synced 2024-06-28 16:48:04 +02:00
acl_create_editions
This commit is contained in:
parent
36356dd5c5
commit
792325f71d
|
@ -94,7 +94,7 @@ let AccordionListItemEditionWidget = React.createClass({
|
||||||
let numEditions = piece.num_editions;
|
let numEditions = piece.num_editions;
|
||||||
|
|
||||||
if(numEditions <= 0) {
|
if(numEditions <= 0) {
|
||||||
if (piece.acl.acl_editions){
|
if (piece.acl.acl_create_editions){
|
||||||
return (
|
return (
|
||||||
<CreateEditionsButton
|
<CreateEditionsButton
|
||||||
label={getLangText('Create editions')}
|
label={getLangText('Create editions')}
|
||||||
|
|
|
@ -66,7 +66,7 @@ let CreateEditionsButton = React.createClass({
|
||||||
render: function () {
|
render: function () {
|
||||||
let piece = this.props.piece;
|
let piece = this.props.piece;
|
||||||
|
|
||||||
if (!piece.acl.acl_editions || piece.num_editions > 0){
|
if (!piece.acl.acl_create_editions || piece.num_editions > 0){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ let PieceListToolbar = React.createClass({
|
||||||
<span className="pull-right">
|
<span className="pull-right">
|
||||||
<PieceListToolbarFilterWidget
|
<PieceListToolbarFilterWidget
|
||||||
filterParams={['acl_transfer', 'acl_consign', {
|
filterParams={['acl_transfer', 'acl_consign', {
|
||||||
key: 'acl_editions',
|
key: 'acl_create_editions',
|
||||||
label: 'create editions'
|
label: 'create editions'
|
||||||
}]} />
|
}]} />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -140,7 +140,7 @@ let RegisterPiece = React.createClass( {
|
||||||
},
|
},
|
||||||
|
|
||||||
getSpecifyEditions() {
|
getSpecifyEditions() {
|
||||||
if(this.state.whitelabel && this.state.whitelabel.acl_editions || Object.keys(this.state.whitelabel).length === 0) {
|
if(this.state.whitelabel && this.state.whitelabel.acl_create_editions || Object.keys(this.state.whitelabel).length === 0) {
|
||||||
return (
|
return (
|
||||||
<PropertyCollapsible
|
<PropertyCollapsible
|
||||||
name="num_editions"
|
name="num_editions"
|
||||||
|
|
|
@ -10,9 +10,9 @@ let constants = {
|
||||||
'apiEndpoint': window.API_ENDPOINT,
|
'apiEndpoint': window.API_ENDPOINT,
|
||||||
'serverUrl': window.SERVER_URL,
|
'serverUrl': window.SERVER_URL,
|
||||||
'baseUrl': window.BASE_URL,
|
'baseUrl': window.BASE_URL,
|
||||||
'aclList': ['acl_coa', 'acl_consign', 'acl_delete', 'acl_download', 'acl_edit', 'acl_editions',
|
'aclList': ['acl_coa', 'acl_consign', 'acl_delete', 'acl_download', 'acl_edit', 'acl_create_editions', 'acl_view_editions',
|
||||||
'acl_loan', 'acl_share', 'acl_transfer', 'acl_unconsign', 'acl_unshare', 'acl_view',
|
'acl_loan', 'acl_share', 'acl_transfer', 'acl_unconsign', 'acl_unshare', 'acl_view',
|
||||||
'acl_withdraw_transfer'],
|
'acl_withdraw_transfer', 'acl_submit_to_prize'],
|
||||||
|
|
||||||
'version': 0.1,
|
'version': 0.1,
|
||||||
'csrftoken': 'csrftoken2',
|
'csrftoken': 'csrftoken2',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user