From 548e9d240fddcb19e4b0d480c0639a90f50c99a7 Mon Sep 17 00:00:00 2001 From: qskousen Date: Wed, 24 May 2023 20:13:59 -0500 Subject: [PATCH] Add authorization section to documentation (#34) --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0da9dc0..598fb3c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) \ No newline at end of file +[![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)