Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxachun committed Oct 18, 2024
1 parent 73dbd31 commit 773e977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/user-permissions/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Also, try to avoid using the `@GetCurrentUser` decorator (which often leads to u
```diff
- @RequiredPermission("products", {skipScopeCheck: true})
+ @RequiredPermission("products")
+ @AffectedEntity(User)
+ @AffectedEntity(User, { idArg: "userId" })
- async myProducts(@GetCurrentUser() currentUser: CurrentUser): Promise<Product[]> {
+ async productsForUser(@Args("userId", { type: () => ID }) userId: string): Promise<Product[]> {
//...
Expand Down

0 comments on commit 773e977

Please sign in to comment.