Web: Files: fixed sharing

This commit is contained in:
Viktor Fomin 2021-08-06 12:13:45 +03:00
parent 40c1ede888
commit cf66b2041a
2 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,6 @@ export default function withFileActions(WrappedFileItem) {
} = item;
if (encrypted && isPrivacy) return checkProtocol(item.id, true);
console.log("item", item);
if (isTrashFolder) return;
if (e && e.target.tagName === "INPUT") return;
@ -270,6 +269,7 @@ export default function withFileActions(WrappedFileItem) {
isDesktop,
personal,
canWebEdit,
canViewedDocs,
} = this.props;
const { fileExst, access, contentLength, id, shared } = item;
@ -296,7 +296,7 @@ export default function withFileActions(WrappedFileItem) {
const sharedButton =
!canShare ||
!showShare ||
(personal && !canWebEdit) ||
(personal && !canWebEdit && !canViewedDocs) ||
isEdit ||
id <= 0 ||
isMobile

View File

@ -461,7 +461,7 @@ class FilesStore {
"unsubscribe",
]);
if (!this.isWebEditSelected) {
if (!this.isWebEditSelected && !canViewedDocs(item.fileExst)) {
fileOptions = this.removeOptions(fileOptions, ["sharing-settings"]);
}
}