Skip to content

Commit bca6b6a

Browse files
committed
Better example in fine-grained documentation
This PR improves the fine-grained security documentation examples.
1 parent f5ebccd commit bca6b6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/fine-grained-security.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ You can use the `this` variable to access any (public) property / method of the
151151
```php
152152
class Post {
153153
/**
154-
* @Query
155-
* @Security("this.canAccess(post, user)")
154+
* @Field
155+
* @Security("this.canAccessBody(user)")
156156
*/
157-
public function getPost(Post $post): array
157+
public function getBody(): array
158158
{
159159
// ...
160160
}
161161

162-
public function canAccess(Post $post, User $user): bool
162+
public function canAccessBody(User $user): bool
163163
{
164164
// Some custom logic here
165165
}

0 commit comments

Comments
 (0)