File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
modules/permit-application-payment/application Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export class VersionMatchMiddleware implements NestMiddleware {
1111 use ( request : Request , _response : Response , next : NextFunction ) : void {
1212 const { headers } = request ;
1313 const origin = request . get ( 'origin' ) ;
14- const isProduction = process . env . NODE_ENV === 'production'
14+ const isProduction = process . env . NODE_ENV === 'production' ;
1515 /**
1616 * origin is available only when the request is coming from the browser.
1717 * Interaction between backend pods does not have origin header.
Original file line number Diff line number Diff line change @@ -623,7 +623,10 @@ export class ApplicationService {
623623 existingApplication ?. permitData ?. permitData ,
624624 ) as PermitData ;
625625 const currentDate = dayjs ( new Date ( ) . toISOString ( ) ) ?. format ( 'YYYY-MM-DD' ) ;
626- if ( differenceBetween ( permitData ?. startDate , currentDate , 'days' ) > 0 ) {
626+ if (
627+ ! doesUserHaveRole ( currentUser . orbcUserRole , IDIR_USER_ROLE_LIST ) &&
628+ differenceBetween ( permitData ?. startDate , currentDate , 'days' ) > 0
629+ ) {
627630 throwUnprocessableEntityException ( 'Start Date is in the past.' ) ;
628631 } else if ( existingCase . assignedUser !== currentUser . userName ) {
629632 throwUnprocessableEntityException (
You can’t perform that action at this time.
0 commit comments