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

Encryption options are supported when creating departmental repositories

This commit is contained in:
zxj96
2019-06-24 17:01:14 +08:00
parent 2354fd9964
commit fe2f36adae
2 changed files with 13 additions and 1 deletions

View File

@@ -50,6 +50,10 @@ class CreateRepoDialog extends React.Component {
let password = this.state.encrypt ? this.state.password1 : '';
let permission= this.state.permission;
let repo = this.createRepo(repoName, password, permission);
if (this.props.libraryType === 'department') {
this.props.onCreateRepo(repo, 'department');
return;
}
this.props.onCreateRepo(repo);
}
}
@@ -150,6 +154,13 @@ class CreateRepoDialog extends React.Component {
permission: permission,
};
}
if (libraryType === 'department') {
repo = {
repo_name: repoName,
passwd: password,
permission: 'rw',
};
}
return repo;
}