mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
@@ -207,7 +207,7 @@ class TreeNodeView extends React.Component {
|
||||
|
||||
let menuList = [RENAME, DELETE, COPY, MOVE, OPEN_VIA_CLIENT];
|
||||
if (node.object.type === 'dir') {
|
||||
menuList = [NEW_FOLDER, NEW_FILE, COPY, MOVE, RENAME, DELETE];
|
||||
menuList = [NEW_FOLDER, NEW_FILE, COPY, MOVE, RENAME, DELETE];
|
||||
}
|
||||
|
||||
const { userPerm } = this.props;
|
||||
@@ -217,11 +217,11 @@ class TreeNodeView extends React.Component {
|
||||
}
|
||||
|
||||
menuList = [];
|
||||
const { modify: canModify, delete: canDelete, copy: canCopy } = customPermission.permission;
|
||||
if (node.object.type === 'dir') {
|
||||
canModify && menuList.push(NEW_FOLDER, NEW_FILE);
|
||||
const { create: canCreate, modify: canModify, delete: canDelete, copy: canCopy } = customPermission.permission;
|
||||
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