mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
[file share] fixup for 'internal link' (#4637)
This commit is contained in:
@@ -65,7 +65,7 @@ class FileToolbar extends React.Component {
|
|||||||
let showShareBtn = false;
|
let showShareBtn = false;
|
||||||
if (repoEncrypted) {
|
if (repoEncrypted) {
|
||||||
showShareBtn = true; // for internal link
|
showShareBtn = true; // for internal link
|
||||||
} else if ((filePerm == 'rw' || filePerm == 'r') && canGenerateShareLink) {
|
} else if (filePerm == 'rw' || filePerm == 'r') {
|
||||||
showShareBtn = true;
|
showShareBtn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1290,11 +1290,10 @@ export const Utils = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dirent && dirent.type === 'file') {
|
if (dirent && dirent.type === 'file') {
|
||||||
let hasGenerateShareLinkPermission = false;
|
if (userDirPermission == 'rw' || userDirPermission == 'r') {
|
||||||
if (canGenerateShareLink && (userDirPermission == 'rw' || userDirPermission == 'r')) {
|
// can generate internal link
|
||||||
hasGenerateShareLinkPermission = true;
|
return true;
|
||||||
}
|
}
|
||||||
return hasGenerateShareLinkPermission;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// the root path or the dirent type is dir
|
// the root path or the dirent type is dir
|
||||||
|
Reference in New Issue
Block a user