mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
Encryption options are supported when creating departmental repositories
This commit is contained in:
@@ -50,6 +50,10 @@ class CreateRepoDialog extends React.Component {
|
|||||||
let password = this.state.encrypt ? this.state.password1 : '';
|
let password = this.state.encrypt ? this.state.password1 : '';
|
||||||
let permission= this.state.permission;
|
let permission= this.state.permission;
|
||||||
let repo = this.createRepo(repoName, password, permission);
|
let repo = this.createRepo(repoName, password, permission);
|
||||||
|
if (this.props.libraryType === 'department') {
|
||||||
|
this.props.onCreateRepo(repo, 'department');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.props.onCreateRepo(repo);
|
this.props.onCreateRepo(repo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,6 +154,13 @@ class CreateRepoDialog extends React.Component {
|
|||||||
permission: permission,
|
permission: permission,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (libraryType === 'department') {
|
||||||
|
repo = {
|
||||||
|
repo_name: repoName,
|
||||||
|
passwd: password,
|
||||||
|
permission: 'rw',
|
||||||
|
};
|
||||||
|
}
|
||||||
return repo;
|
return repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -496,10 +496,11 @@ class GroupView extends React.Component {
|
|||||||
</ModalPortal>
|
</ModalPortal>
|
||||||
)}
|
)}
|
||||||
{this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup &&
|
{this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup &&
|
||||||
<CreateDepartmentRepoDialog
|
<CreateRepoDialog
|
||||||
isAdmin={this.state.isAdmin}
|
isAdmin={this.state.isAdmin}
|
||||||
onCreateToggle={this.onCreateRepoToggle}
|
onCreateToggle={this.onCreateRepoToggle}
|
||||||
onCreateRepo={this.onCreateRepo}
|
onCreateRepo={this.onCreateRepo}
|
||||||
|
libraryType='department'
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{this.state.showRenameGroupDialog &&
|
{this.state.showRenameGroupDialog &&
|
||||||
|
Reference in New Issue
Block a user