Skip to content

Commit

Permalink
test: add environment e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Feb 16, 2024
1 parent 5b3dde6 commit 07fd0f2
Show file tree
Hide file tree
Showing 5 changed files with 638 additions and 18 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/common/get-environment-with-authority.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConflictException, NotFoundException } from '@nestjs/common'
import { NotFoundException, UnauthorizedException } from '@nestjs/common'
import { Authority, Environment, PrismaClient, User } from '@prisma/client'
import getCollectiveProjectAuthorities from './get-collective-project-authorities'

Expand Down Expand Up @@ -35,7 +35,7 @@ export default async function getEnvironmentWithAuthority(
!permittedAuthorities.has(authority) &&
!permittedAuthorities.has(Authority.WORKSPACE_ADMIN)
) {
throw new ConflictException(
throw new UnauthorizedException(
`User ${userId} does not have the required authorities`
)
}
Expand Down
Loading

0 comments on commit 07fd0f2

Please sign in to comment.