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:
@@ -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 (
|
||||
|
Reference in New Issue
Block a user