mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
change permission on share pop up (#4386)
* change permission on share pop up * update * add Utils.getShareLinkPermissionStr
This commit is contained in:
@@ -155,6 +155,23 @@ export const Utils = {
|
||||
return permissionOptions;
|
||||
},
|
||||
|
||||
getShareLinkPermissionStr: function(permissions) {
|
||||
const { can_edit, can_download } = permissions;
|
||||
if (can_edit) {
|
||||
if (can_download) {
|
||||
return 'edit_download';
|
||||
} else {
|
||||
return 'cloud_edit';
|
||||
}
|
||||
} else {
|
||||
if (can_download) {
|
||||
return 'preview_download';
|
||||
} else {
|
||||
return 'preview_only';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isEditableOfficeFile: function(filename) {
|
||||
// no file ext
|
||||
if (filename.lastIndexOf('.') == -1) {
|
||||
|
Reference in New Issue
Block a user