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

Dir mode optimized (#2992)

* optimized isRepoOwner&isAdmin

* optimized isAdmin

* optimized encrypted porps

* optimized showShareBtn judgement

* repair share bug

* update showShareBtn logic

* delete unnecessary comment
This commit is contained in:
杨顺强
2019-02-27 13:53:36 +08:00
committed by Daniel Pan
parent 34d4fe1017
commit 344eca259a
12 changed files with 61 additions and 81 deletions

View File

@@ -86,6 +86,7 @@ class GroupList extends React.Component {
const propTypes = {
isGroupOwnedRepo: PropTypes.bool,
itemPath: PropTypes.string.isRequired,
itemType: PropTypes.string.isRequired,
repoID: PropTypes.string.isRequired
};
@@ -106,7 +107,12 @@ class ShareToGroup extends React.Component {
sharedItems: []
};
this.options = [];
this.permissions = ['rw', 'r', 'cloud-edit', 'preview'];
this.permissions = []
if (this.props.itemType === 'library') {
this.permissions = ['rw', 'r', 'admin', 'cloud-edit', 'preview'];
} else if (this.props.itemType === 'dir') {
this.permissions = ['rw', 'r', 'cloud-edit', 'preview'];
}
if (this.props.isGroupOwnedRepo || !isPro) {
this.permissions = ['rw', 'r'];
}