mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
Merge pull request #42 from ascribe/AD-1434-hide-actions-in-detail-pages-if-they-re-not-available
Display actions only if ACLs are available
This commit is contained in:
commit
2130b74a96
@ -222,7 +222,12 @@ let EditionSummary = React.createClass({
|
|||||||
value={ edition.owner } />
|
value={ edition.owner } />
|
||||||
<LicenseDetail license={edition.license_type}/>
|
<LicenseDetail license={edition.license_type}/>
|
||||||
{this.getStatus()}
|
{this.getStatus()}
|
||||||
<AclProxy show={currentUser && currentUser.email}>
|
{/*
|
||||||
|
`acl_view` is always available in `edition.acl`, therefore if it has
|
||||||
|
no more than 1 key, we're hiding the `DetailProperty` actions as otherwise
|
||||||
|
`AclInformation` would show up
|
||||||
|
*/}
|
||||||
|
<AclProxy show={currentUser && currentUser.email && Object.keys(edition.acl).length > 1}>
|
||||||
<EditionDetailProperty
|
<EditionDetailProperty
|
||||||
label={getLangText('ACTIONS')}>
|
label={getLangText('ACTIONS')}>
|
||||||
<EditionActionPanel
|
<EditionActionPanel
|
||||||
|
@ -203,7 +203,12 @@ let PieceContainer = React.createClass({
|
|||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<AclProxy
|
<AclProxy
|
||||||
show={currentUser && currentUser.email}>
|
show={currentUser && currentUser.email && Object.keys(piece.acl).length > 1}>
|
||||||
|
{/*
|
||||||
|
`acl_view` is always available in `edition.acl`, therefore if it has
|
||||||
|
no more than 1 key, we're hiding the `DetailProperty` actions as otherwise
|
||||||
|
`AclInformation` would show up
|
||||||
|
*/}
|
||||||
<DetailProperty label={getLangText('ACTIONS')}>
|
<DetailProperty label={getLangText('ACTIONS')}>
|
||||||
<AclButtonList
|
<AclButtonList
|
||||||
className="ascribe-button-list"
|
className="ascribe-button-list"
|
||||||
|
Loading…
Reference in New Issue
Block a user