Skip to content

Commit

Permalink
fix: Always display download button for public resources
Browse files Browse the repository at this point in the history
  • Loading branch information
das-Abroxas committed Apr 18, 2024
1 parent ef14f5f commit 31f2499
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/objects/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ const objectInfo = await fetchResource(resourceId)
function isDownloadable(): boolean {
if (objectInfo) {
if (objectInfo.data_class === v2DataClass.DATA_CLASS_PUBLIC) {
return true
}
return objectInfo.variant === v2ResourceVariant.RESOURCE_VARIANT_OBJECT &&
objectInfo.object_status === modelsv2Status.STATUS_AVAILABLE &&
objectInfo.permission !== v2PermissionLevel.PERMISSION_LEVEL_UNSPECIFIED &&
Expand Down

0 comments on commit 31f2499

Please sign in to comment.