1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

repair permission error

This commit is contained in:
shanshuirenjia
2019-06-20 17:13:15 +08:00
parent 4979571104
commit d1c8a5cc50
3 changed files with 33 additions and 11 deletions

View File

@@ -88,7 +88,8 @@ const propTypes = {
isGroupOwnedRepo: PropTypes.bool,
itemPath: PropTypes.string.isRequired,
itemType: PropTypes.string.isRequired,
repoID: PropTypes.string.isRequired
repoID: PropTypes.string.isRequired,
isRepoOwner: PropTypes.bool.isRequired,
};
const NoOptionsMessage = (props) => {
@@ -109,9 +110,10 @@ class ShareToGroup extends React.Component {
};
this.options = [];
this.permissions = []
if (this.props.itemType === 'library') {
this.permissions = ['rw', 'r', 'admin', 'cloud-edit', 'preview'];
} else if (this.props.itemType === 'dir') {
let { itemType, isRepoOwner } = props;
if (itemType === 'library') {
this.permissions = isRepoOwner ? ['rw', 'r', 'admin', 'cloud-edit', 'preview'] : ['rw', 'r', 'cloud-edit', 'preview'];
} else if (itemType === 'dir') {
this.permissions = ['rw', 'r', 'cloud-edit', 'preview'];
}
if (this.props.isGroupOwnedRepo || !isPro) {