1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

[share] added permission check (#2900)

This commit is contained in:
llj
2019-01-29 10:06:26 +08:00
committed by Daniel Pan
parent 53f42e4283
commit d9a2f6ded9
12 changed files with 193 additions and 29 deletions

View File

@@ -313,6 +313,8 @@ class SharedRepoListItem extends React.Component {
renderPCUI = () => {
let { iconUrl, iconTitle, libPath } = this.getRepoComputeParams();
let { repo } = this.props;
// TODO: enableDirPrivateShare, isGroupOwnedRepo
let isGroupOwnedRepo = repo.owner_email.indexOf('@seafile_group') > -1;
return (
<Fragment>
@@ -331,6 +333,10 @@ class SharedRepoListItem extends React.Component {
itemName={repo.repo_name}
itemPath={'/'}
repoID={repo.repo_id}
repoEncrypted={repo.encrypted}
enableDirPrivateShare={true}
userPerm={repo.permission}
isAdmin={repo.is_admin}
isGroupOwnedRepo={isGroupOwnedRepo}
toggleDialog={this.toggleShareDialog}
/>
@@ -363,6 +369,10 @@ class SharedRepoListItem extends React.Component {
itemName={repo.repo_name}
itemPath={'/'}
repoID={repo.repo_id}
repoEncrypted={repo.encrypted}
enableDirPrivateShare={true}
userPerm={repo.permission}
isAdmin={repo.is_admin}
isGroupOwnedRepo={isGroupOwnedRepo}
toggleDialog={this.toggleShareDialog}
/>