Skip to content

Commit

Permalink
Update role-permissions.md (#2631)
Browse files Browse the repository at this point in the history
* Revert #1122

---------

Co-authored-by: Chris Brown <code@drbyte.dev>
  • Loading branch information
killjin and drbyte committed Mar 21, 2024
1 parent 0c234d6 commit 1702798
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions docs/basic-usage/role-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,3 @@ All these responses are collections of `Spatie\Permission\Models\Permission` obj
If we follow the previous example, the first response will be a collection with the `delete article` permission and
the second will be a collection with the `edit article` permission and the third will contain both.



## NOTE about using permission names in policies

When calling `authorize()` for a policy method, if you have a permission named the same as one of those policy methods, your permission "name" will take precedence and not fire the policy. For this reason it may be wise to avoid naming your permissions the same as the methods in your policy. While you can define your own method names, you can read more about the defaults Laravel offers in Laravel's documentation at [Writing Policies](https://laravel.com/docs/authorization#writing-policies).

0 comments on commit 1702798

Please sign in to comment.