Skip to content

Commit

Permalink
update authentication guards in proposals and samples controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Jul 22, 2024
1 parent 9284595 commit cae8d10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/proposals/proposals.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
ApiTags,
} from "@nestjs/swagger";
import { PoliciesGuard } from "src/casl/guards/policies.guard";
import { AuthenticatedPoliciesGuard } from "../casl/guards/auth-check.guard";
import { CheckPolicies } from "src/casl/decorators/check-policies.decorator";
import { AppAbility, CaslAbilityFactory } from "src/casl/casl-ability.factory";
import { Action } from "src/casl/action.enum";
Expand Down
4 changes: 2 additions & 2 deletions src/samples/samples.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class SamplesController {
}

// GET /samples
@UseGuards(AuthenticatedPoliciesGuard)
@UseGuards(PoliciesGuard)
@CheckPolicies((ability: AppAbility) =>
ability.can(Action.SampleRead, SampleClass),
)
Expand Down Expand Up @@ -712,7 +712,7 @@ export class SamplesController {
}

// GET /samples/:id/attachments
@UseGuards(AuthenticatedPoliciesGuard)
@UseGuards(PoliciesGuard)
@CheckPolicies((ability: AppAbility) =>
ability.can(Action.SampleAttachmentRead, SampleClass),
)
Expand Down

0 comments on commit cae8d10

Please sign in to comment.