Skip to content

Commit

Permalink
Merge pull request #324 from bcgov/oleks
Browse files Browse the repository at this point in the history
hotfix - platform users should not see listings link in top-menu (DSS-440)
  • Loading branch information
ychung-mot authored May 29, 2024
2 parents 29db5d6 + fa1907d commit 25cb6d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions frontend/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export const routes: Routes = [
component: DelistingRequestComponent,
data: { permissions: [takedown_action] }
},
{
path: 'listings',
canActivate: [approvedUserGuard, activeUserGuard, hasPermissionsGuard, areTermsAceptedGuard],
component: ListingsTableComponent,
data: { permissions: [listing_read] }
},
// {
// path: 'listings',
// canActivate: [approvedUserGuard, activeUserGuard, hasPermissionsGuard, areTermsAceptedGuard],
// component: ListingsTableComponent,
// data: { permissions: [listing_read] }
// },
{
path: 'access-request',
canActivate: [accessRequestTokenGuard],
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/app/common/layout/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ErrorHandlingService } from '../services/error-handling.service';
import { ErrorBackEnd } from '../models/errors';
import { TopMenuService } from '../services/top-menu.service';
import { TooltipModule } from 'primeng/tooltip';
import { listing_read } from '../consts/permissions.const';

@Component({
selector: 'app-layout',
Expand Down Expand Up @@ -78,10 +79,12 @@ export class LayoutComponent {
return !!item.items?.length;
});

this.items?.unshift({
label: 'Listings',
routerLink: '/listings',
});
// if (this.userDataService.currentUser.permissions.includes(listing_read)) {
// this.items?.unshift({
// label: 'Listings',
// routerLink: '/listings',
// });
// }

this.items?.unshift({
label: 'Home',
Expand Down

0 comments on commit 25cb6d1

Please sign in to comment.