mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
@@ -270,16 +270,16 @@ class TreeView extends React.Component {
|
||||
|
||||
menuList = [];
|
||||
|
||||
const { modify: canModify, delete: canDelete, copy: canCopy } = customPermission.permission;
|
||||
const { create: canCreate, modify: canModify, delete: canDelete, copy: canCopy } = customPermission.permission;
|
||||
if (!node) {
|
||||
canModify && menuList.push(NEW_FOLDER, NEW_FILE);
|
||||
canCreate && menuList.push(NEW_FOLDER, NEW_FILE);
|
||||
return menuList;
|
||||
}
|
||||
|
||||
if (node.object.type === 'dir') {
|
||||
canModify && menuList.push(NEW_FOLDER, NEW_FILE);
|
||||
if (node.object.type === 'dir') {
|
||||
canCreate && menuList.push(NEW_FOLDER, NEW_FILE);
|
||||
}
|
||||
|
||||
|
||||
canCopy && menuList.push(COPY);
|
||||
canModify && menuList.push(MOVE, RENAME);
|
||||
canDelete && menuList.push(DELETE);
|
||||
|
Reference in New Issue
Block a user