Skip to content

Commit

Permalink
Blocks limited acces create civil claimant file for now
Browse files Browse the repository at this point in the history
  • Loading branch information
gudjong committed Nov 29, 2024
1 parent 085f204 commit 4b21034
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ export class LimitedAccessWriteCaseFileGuard implements CanActivate {
const request = context.switchToHttp().getRequest()

const user: User = request.user

if (!user) {
throw new InternalServerErrorException('Missing user')
}

const theCase: Case = request.case

if (!theCase) {
throw new InternalServerErrorException('Missing case')
}

if (!user) {
throw new InternalServerErrorException('Missing user')
}

// The case file category is either in the request body (creating case file)
// or in the case file (deleting case file)
const caseFileCategory: CaseFileCategory =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class LimitedAccessFileController {
CaseWriteGuard,
LimitedAccessWriteCaseFileGuard,
)
@RolesRules(defenderRule)
@RolesRules() // This endpoint is not used by any role at the moment
@Post('civilClaimant/:civilClaimantId/file')
@ApiCreatedResponse({
type: CaseFile,
Expand Down

0 comments on commit 4b21034

Please sign in to comment.