mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
Merge branch '7.0'
This commit is contained in:
@@ -116,7 +116,7 @@ export const Utils = {
|
||||
}
|
||||
},
|
||||
|
||||
getShareLinkPermissionList: function(itemType, permission, path) {
|
||||
getShareLinkPermissionList: function(itemType, permission = null, path, canEdit = null) {
|
||||
// itemType: library, dir, file
|
||||
// permission: rw, r, admin, cloud-edit, preview
|
||||
|
||||
@@ -139,12 +139,15 @@ export const Utils = {
|
||||
if (permission == 'rw' || permission == 'admin' || permission == 'r') {
|
||||
permissionOptions.push(downloadOption);
|
||||
}
|
||||
if (this.isEditableOfficeFile(path) && (permission == 'rw' || permission == 'admin')) {
|
||||
if (this.isEditableOfficeFile(path) && (permission == 'rw' || permission == 'admin') && canEdit) {
|
||||
permissionOptions.push(editDownloadOption);
|
||||
}
|
||||
if (this.isEditableOfficeFile(path) && (permission == 'cloud-edit')) {
|
||||
permissionOptions.push(editOnly);
|
||||
}
|
||||
|
||||
// not support
|
||||
// if (this.isEditableOfficeFile(path) && (permission == 'cloud-edit')) {
|
||||
// permissionOptions.push(editOnly);
|
||||
// }
|
||||
|
||||
}
|
||||
return permissionOptions;
|
||||
},
|
||||
|
Reference in New Issue
Block a user