From 51d160e7d6b5811d137c01191364fad32455b36e Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 27 Jul 2017 20:18:31 +0100 Subject: [PATCH] Hide edit button when user does not have permission to edit. --- src/components/views/elements/AppTile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 57821504af..8832a61a10 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -231,7 +231,7 @@ export default React.createClass({ } // editing is done in scalar - const showEditButton = Boolean(this._scalarClient); + const showEditButton = Boolean(this._scalarClient && this._canUserModify()); const deleteWidgetLabel = this._deleteWidgetLabel(); let deleteIcon = 'img/cancel.svg'; let deleteClasses = 'mx_filterFlipColor mx_AppTileMenuBarWidget'; @@ -250,7 +250,9 @@ export default React.createClass({ {showEditButton && Edit}