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

[repo snapshot] enable department admin to restore department repo (#4446)

This commit is contained in:
llj
2020-02-21 20:26:13 +08:00
committed by GitHub
parent 64e7a5ebde
commit 0b0d118ca0
3 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ import './css/search.css';
import './css/repo-snapshot.css';
const {
repoID, repoName, isRepoOwner,
repoID, repoName, canRestoreRepo,
commitID, commitTime, commitDesc, commitRelativeTime,
showAuthor, authorAvatarURL, authorName, authorNickName
} = window.app.pageOptions;
@@ -159,7 +159,7 @@ class RepoSnapshot extends React.Component {
)}
<div className="d-flex justify-content-between align-items-center op-bar">
<p className="m-0">{gettext('Current path: ')}{this.renderPath()}</p>
{(folderPath == '/' && isRepoOwner) &&
{(folderPath == '/' && canRestoreRepo) &&
<button className="btn btn-secondary op-bar-btn" onClick={this.toggleDialog}>{gettext('Restore')}</button>
}
</div>