Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport-2024-11-27 #2003

Merged
merged 8 commits into from
Nov 29, 2024
Merged
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);
Loading