Skip to content

Commit

Permalink
[DSC-1601] - Adjusted code for fixing requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone-Ramundi committed Apr 29, 2024
1 parent 0920964 commit 0aae329
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h5 class="simple-view-element-header">{{"item.page.filesection.original.bundle"
</dl>
</div>
<div *ngIf="!hasNoDownload(file)" class="col-2">
<ds-themed-file-download-link [showIcon]="(canDownload(file) | async)" [bitstream]="file" [item]="item">
<ds-themed-file-download-link [showIcon]="!(canDownload(file) | async)" [bitstream]="file" [item]="item">
{{"item.page.filesection.download" | translate}}
</ds-themed-file-download-link>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FileSectionComponent } from '../../../simple/field-components/file-sect
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
import { PaginatedList } from '../../../../core/data/paginated-list.model';
import { RemoteData } from '../../../../core/data/remote-data';
import { map, switchMap, tap } from 'rxjs/operators';
import { switchMap, tap } from 'rxjs/operators';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
import { hasValue, isEmpty } from '../../../../shared/empty.util';
Expand Down Expand Up @@ -116,9 +116,7 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
}

canDownload(file: Bitstream): Observable<boolean> {
return this.authorizationService.isAuthorized(FeatureID.CanDownload, file.self).pipe(
map(value => !value),
);
return this.authorizationService.isAuthorized(FeatureID.CanDownload, file.self);
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 0aae329

Please sign in to comment.