Skip to content

Commit

Permalink
Merge pull request #2003 from bcgov/backport-2024-11-27
Browse files Browse the repository at this point in the history
Backport-2024-11-27
  • Loading branch information
Abradat authored Nov 29, 2024
2 parents b7353b3 + 1445455 commit eab439e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 2 additions & 0 deletions alcs-frontend/src/app/features/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ export class SearchComponent implements OnInit, OnDestroy {
if (this.portalStatusFilterDropDownComponent) {
this.portalStatusFilterDropDownComponent.reset();
}

this.clearTags();
}

getSearchParams(): SearchRequestDto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class SubdDetailsComponent {

this.totalAcres = applicationSubmission.subdProposedLots
.reduce((total, lot) => total + (lot.size !== null ? lot.size : 0), 0)
.toFixed(2);
.toFixed(5);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ApiOAuth2 } from '@nestjs/swagger';
import * as config from 'config';
import { RolesGuard } from '../../../common/authorization/roles-guard.service';
import { UserRoles } from '../../../common/authorization/roles.decorator';
import { AUTH_ROLE } from '../../../common/authorization/roles';
import { ANY_ROLE_BUT_COMMISSIONER, AUTH_ROLE } from '../../../common/authorization/roles';
import { TagCategoryDto } from './tag-category.dto';
import { TagCategoryService } from './tag-category.service';

Expand All @@ -14,7 +14,7 @@ export class TagCategoryController {
constructor(private service: TagCategoryService) {}

@Get('')
@UserRoles(AUTH_ROLE.ADMIN)
@UserRoles(...ANY_ROLE_BUT_COMMISSIONER)
async fetch(
@Query('pageIndex') pageIndex: number,
@Query('itemsPerPage') itemsPerPage: number,
Expand Down
4 changes: 2 additions & 2 deletions services/apps/alcs/src/alcs/tag/tag.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as config from 'config';
import { RolesGuard } from '../../common/authorization/roles-guard.service';
import { UserRoles } from '../../common/authorization/roles.decorator';
import { TagService } from './tag.service';
import { AUTH_ROLE } from '../../common/authorization/roles';
import { ANY_ROLE_BUT_COMMISSIONER, AUTH_ROLE } from '../../common/authorization/roles';
import { TagDto } from './tag.dto';

@Controller('tag')
Expand All @@ -14,7 +14,7 @@ export class TagController {
constructor(private service: TagService) {}

@Get('')
@UserRoles(AUTH_ROLE.ADMIN)
@UserRoles(...ANY_ROLE_BUT_COMMISSIONER)
async fetch(
@Query('pageIndex') pageIndex: number,
@Query('itemsPerPage') itemsPerPage: number,
Expand Down
11 changes: 3 additions & 8 deletions services/apps/alcs/src/common/authorization/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ export const ROLES_ALLOWED_APPLICATIONS = [
];

export const ROLES_ALLOWED_BOARDS = ROLES_ALLOWED_APPLICATIONS;
export const ROLES_ALLOWED_ARCHIVE = [
AUTH_ROLE.ADMIN,
AUTH_ROLE.APP_SPECIALIST,
];
export const ROLES_ALLOWED_ARCHIVE = [AUTH_ROLE.ADMIN, AUTH_ROLE.APP_SPECIALIST];
export const ANY_AUTH_ROLE = Object.values(AUTH_ROLE);
export const ROLES_ALLOWED_SEARCH = [
...ROLES_ALLOWED_APPLICATIONS,
AUTH_ROLE.COMMISSIONER,
];
export const ROLES_ALLOWED_SEARCH = [...ROLES_ALLOWED_APPLICATIONS, AUTH_ROLE.COMMISSIONER];
export const ANY_ROLE_BUT_COMMISSIONER = Object.values(AUTH_ROLE).filter((role) => role !== AUTH_ROLE.COMMISSIONER);

0 comments on commit eab439e

Please sign in to comment.