1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

Merge pull request #3715 from haiwen/department-add-encrypt

Department add encrypt
This commit is contained in:
Daniel Pan
2019-06-25 11:42:37 +08:00
committed by GitHub
4 changed files with 16 additions and 5 deletions

View File

@@ -13361,9 +13361,9 @@
}
},
"seafile-js": {
"version": "0.2.93",
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.93.tgz",
"integrity": "sha512-5stGnu5LJZj2MoN9ABjh/iYBpQpF5skbxmXZH4w4Vb1GVeQOWFz7oGWe0pSMMZvKriXN6GNRHB0K1nkL+OFBAg==",
"version": "0.2.94",
"resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.94.tgz",
"integrity": "sha512-X7mYw2w9j4F/jSsy4g5LeigyqBZkKhvCf1y9OcKjhw/u4ZCqgztejjIKXVZwm18VtePOo4fxg5HooXn9pQoNUg==",
"requires": {
"axios": "^0.18.0",
"form-data": "^2.3.2",

View File

@@ -38,7 +38,7 @@
"react-responsive": "^6.1.1",
"react-select": "^2.4.1",
"reactstrap": "^6.4.0",
"seafile-js": "^0.2.93",
"seafile-js": "^0.2.94",
"socket.io-client": "^2.2.0",
"sw-precache-webpack-plugin": "0.11.4",
"unified": "^7.0.0",

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,12 @@ class CreateRepoDialog extends React.Component {
permission: permission,
};
}
if (libraryType === 'department') {
repo = {
repo_name: repoName,
passwd: password,
};
}
return repo;
}

View File

@@ -496,10 +496,11 @@ class GroupView extends React.Component {
</ModalPortal>
)}
{this.state.isCreateRepoDialogShow && this.state.isDepartmentGroup &&
<CreateDepartmentRepoDialog
<CreateRepoDialog
isAdmin={this.state.isAdmin}
onCreateToggle={this.onCreateRepoToggle}
onCreateRepo={this.onCreateRepo}
libraryType='department'
/>
}
{this.state.showRenameGroupDialog &&