From 2b6c9777e91218b86e33d4062fef4a3130d5ac6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 30 Nov 2015 13:20:05 +0100 Subject: [PATCH 1/2] Display actions only if ACLs are available --- js/components/ascribe_detail/edition.js | 2 +- js/components/ascribe_detail/piece_container.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 254746a6..ef5207d9 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -210,7 +210,7 @@ let EditionSummary = React.createClass({ value={ edition.owner } /> {this.getStatus()} - + 1}> + show={currentUser && currentUser.email && Object.keys(piece.acl).length > 1}> Date: Mon, 7 Dec 2015 10:48:46 +0100 Subject: [PATCH 2/2] Add comment for bug fix hiding actions from detail pages --- js/components/ascribe_detail/edition.js | 5 +++++ js/components/ascribe_detail/piece_container.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index ef5207d9..f0910b51 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -210,6 +210,11 @@ let EditionSummary = React.createClass({ value={ edition.owner } /> {this.getStatus()} + {/* + `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 + */} 1}> diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index d78999fb..7b577fa9 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -197,6 +197,11 @@ let PieceContainer = React.createClass({ return ( 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 + */}