Skip to content

Commit

Permalink
Fixed permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrBohuslavskyi committed Jul 2, 2024
1 parent 50bca34 commit 09dba85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
},
});
Expand Down

0 comments on commit 09dba85

Please sign in to comment.