1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

add perm check (#3078)

This commit is contained in:
杨顺强
2019-03-07 17:31:52 +08:00
committed by Daniel Pan
parent f204e41d64
commit 8523229038

View File

@@ -153,7 +153,12 @@ class DirOperationToolbar extends React.Component {
}
render() {
let { path, repoName } = this.props;
let { path, repoName, userPerm } = this.props;
if (userPerm !== 'rw' && userPerm !== 'admin') {
return '';
}
let itemType = path === '/' ? 'library' : 'dir';
let itemName = path == '/' ? repoName : Utils.getFolderName(path);
return (