diff --git a/frontend/src/components/dialog/create-repo-dialog.js b/frontend/src/components/dialog/create-repo-dialog.js index 6fee61977a..ce1959cc94 100644 --- a/frontend/src/components/dialog/create-repo-dialog.js +++ b/frontend/src/components/dialog/create-repo-dialog.js @@ -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; } diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js index d7c2e3359e..b59f531913 100644 --- a/frontend/src/pages/groups/group-view.js +++ b/frontend/src/pages/groups/group-view.js @@ -496,10 +496,11 @@ class GroupView extends React.Component { )} {this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup && - } {this.state.showRenameGroupDialog &&