Skip to content

Commit

Permalink
Add authorization section to documentation (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
qskousen authored May 25, 2023
1 parent f7a9203 commit 548e9d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ class NewsItem extends Model

For more advanced usage can look at the doc: https://docs.spatie.be/laravel-activitylog/v3/advanced-usage/logging-model-events

## Authorizing

Typical usage of tool authorizing using `->canSee()` or `->canSeeWhen()` when registering the tool will NOT work. To authorize the tool, simply [make and register a Laravel policy](https://laravel.com/docs/10.x/authorization#creating-policies) for the `ActivityLog` model. If a user is not able to view them according to the policy, the tool will not show.


## Customize

Expand Down Expand Up @@ -118,4 +122,4 @@ And change the `resource` in `config/nova-activitylog.php` to your custom nova r
The MIT License (MIT). Please see [License File](LICENSE) for more information.


[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbolechen%2Fnova-activitylog.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbolechen%2Fnova-activitylog?ref=badge_large)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbolechen%2Fnova-activitylog.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbolechen%2Fnova-activitylog?ref=badge_large)

0 comments on commit 548e9d2

Please sign in to comment.