diff --git a/frontend/src/app/features/components/listings-table/listing-details/listing-details.component.ts b/frontend/src/app/features/components/listings-table/listing-details/listing-details.component.ts index ff2a24a2..8cc78040 100644 --- a/frontend/src/app/features/components/listings-table/listing-details/listing-details.component.ts +++ b/frontend/src/app/features/components/listings-table/listing-details/listing-details.component.ts @@ -12,6 +12,7 @@ import { UserDataService } from '../../../../common/services/user-data.service'; import { environment } from '../../../../../environments/environment'; import { SelectedListingsStateService } from '../../../../common/services/selected-listings-state.service'; import { GlobalLoaderService } from '../../../../common/services/global-loader.service'; +import { listing_read, takedown_action } from '../../../../common/consts/permissions.const'; @Component({ selector: 'app-listing-details', @@ -50,7 +51,7 @@ export class ListingDetailsComponent implements OnInit { this.userDataService.getCurrentUser().subscribe({ next: (user) => { - this.isCEU = user.permissions.includes('ceu_action'); + this.isCEU = !user.permissions.includes(takedown_action); }, complete: () => { this.loaderService.loadingEnd(); }, diff --git a/frontend/src/app/features/components/listings-table/listings-table.component.ts b/frontend/src/app/features/components/listings-table/listings-table.component.ts index 4661dc76..a51ce547 100644 --- a/frontend/src/app/features/components/listings-table/listings-table.component.ts +++ b/frontend/src/app/features/components/listings-table/listings-table.component.ts @@ -14,7 +14,7 @@ import { PanelModule } from 'primeng/panel'; import { DropdownOption } from '../../../common/models/dropdown-option'; import { UserDataService } from '../../../common/services/user-data.service'; import { User } from '../../../common/models/user'; -import { ceu_action } from '../../../common/consts/permissions.const'; +import { takedown_action } from '../../../common/consts/permissions.const'; import { ListingDetailsComponent } from './listing-details/listing-details.component'; import { ListingSearchRequest } from '../../../common/models/listing-search-request'; import { ActivatedRoute, Router, RouterModule } from '@angular/router'; @@ -110,7 +110,7 @@ export class ListingsTableComponent implements OnInit { this.userService.getCurrentUser().subscribe({ next: (currentUser: User) => { - this.isCEU = currentUser.permissions.includes(ceu_action); + this.isCEU = !currentUser.permissions.includes(takedown_action); this.getListings(page); }, });