Allow all assets download if crop is not set

pull/1636/head
Piero Toffanin 2025-03-30 17:47:59 -04:00
rodzic 8119db7a16
commit a10726cb7e
1 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -789,10 +789,19 @@ _('Example:'),
$.getJSON(`/api/projects/${project}/tasks/${id}/`)
.done(task => {
if (task){
let hideItems = [];
if (this.props.permissions.indexOf("change") === -1){
if (task.crop){
hideItems = ["all.zip", "backup.zip"];
}else{
hideItems = ["backup.zip"];
}
}
ReactDOM.render(<AssetDownloadButtons task={task}
showLabel={false}
buttonClass="btn-secondary"
hideItems={this.props.permissions.indexOf("change") !== -1 ? [] : ["all.zip", "backup.zip"]}
hideItems={hideItems}
modalContainer={this.modalContainer} />, $downloadAssets.get(0));
}
})