Skip to content

Commit

Permalink
GUI S3 Objects lifecycle (#2759): restore action button available onl…
Browse files Browse the repository at this point in the history
…y for 's3' storage type (#2856)
  • Loading branch information
AleksandrGorodetskii authored Oct 5, 2022
1 parent c2329f8 commit 037a9d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/pipelines/browser/DataStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ export default class DataStorage extends React.Component {
get lifeCycleRestoreEnabled () {
const {info, authenticatedUserInfo} = this.props;
if (authenticatedUserInfo.loaded && info.loaded) {
return roleModel.isOwner(info.value) || authenticatedUserInfo.value.admin;
const isS3 = /^s3$/i.test(info.value.storageType || info.value.type);
return isS3 &&
(roleModel.isOwner(info.value) || authenticatedUserInfo.value.admin);
}
return false;
}
Expand Down

0 comments on commit 037a9d7

Please sign in to comment.