From b5e46aa9031134f235e7e770cf3064bb4f2c5f70 Mon Sep 17 00:00:00 2001 From: shanshuirenjia <978987373@qq.com> Date: Thu, 27 Jun 2019 11:48:41 +0800 Subject: [PATCH] share item show bug --- frontend/src/pages/lib-content-view/lib-content-view.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/lib-content-view/lib-content-view.js b/frontend/src/pages/lib-content-view/lib-content-view.js index 19e7e9256d..14d2cd339e 100644 --- a/frontend/src/pages/lib-content-view/lib-content-view.js +++ b/frontend/src/pages/lib-content-view/lib-content-view.js @@ -1484,7 +1484,11 @@ class LibContentView extends React.Component { let { currentRepoInfo, userPerm } = this.state; let showShareBtn = Utils.isHasPermissionToShare(currentRepoInfo, userPerm); let isRepoOwner = currentRepoInfo.owner_email === username; - + let isVirtual = currentRepoInfo.is_virtual; + let isAdmin = currentRepoInfo.is_admin; + if (!isVirtual && (isRepoOwner || isAdmin)) { + enableDirPrivateShare = true; + } let direntItemsList = this.state.direntList.filter((item, index) => { return index < this.state.itemsShowLength; });