Skip to content

Commit 0aae329

Browse files
[DSC-1601] - Adjusted code for fixing requested
1 parent 0920964 commit 0aae329

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/app/item-page/full/field-components/file-section/full-file-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h5 class="simple-view-element-header">{{"item.page.filesection.original.bundle"
3434
</dl>
3535
</div>
3636
<div *ngIf="!hasNoDownload(file)" class="col-2">
37-
<ds-themed-file-download-link [showIcon]="(canDownload(file) | async)" [bitstream]="file" [item]="item">
37+
<ds-themed-file-download-link [showIcon]="!(canDownload(file) | async)" [bitstream]="file" [item]="item">
3838
{{"item.page.filesection.download" | translate}}
3939
</ds-themed-file-download-link>
4040
</div>

src/app/item-page/full/field-components/file-section/full-file-section.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { FileSectionComponent } from '../../../simple/field-components/file-sect
99
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
1010
import { PaginatedList } from '../../../../core/data/paginated-list.model';
1111
import { RemoteData } from '../../../../core/data/remote-data';
12-
import { map, switchMap, tap } from 'rxjs/operators';
12+
import { switchMap, tap } from 'rxjs/operators';
1313
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
1414
import { TranslateService } from '@ngx-translate/core';
1515
import { hasValue, isEmpty } from '../../../../shared/empty.util';
@@ -116,9 +116,7 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
116116
}
117117

118118
canDownload(file: Bitstream): Observable<boolean> {
119-
return this.authorizationService.isAuthorized(FeatureID.CanDownload, file.self).pipe(
120-
map(value => !value),
121-
);
119+
return this.authorizationService.isAuthorized(FeatureID.CanDownload, file.self);
122120
}
123121

124122
ngOnDestroy(): void {

0 commit comments

Comments
 (0)