]> BookStack Code Mirror - bookstack/commit
Notifications: Fixed send content permission checking
authorDan Brown <redacted>
Thu, 17 Aug 2023 16:57:31 +0000 (17:57 +0100)
committerDan Brown <redacted>
Thu, 17 Aug 2023 16:57:31 +0000 (17:57 +0100)
commit38829f8a38a5bd90f9cce2535c79131c04ae01d6
treea9885bef646600d775ee30cc5f9c412af7bb5ea7
parentee9e342b58a57ae909f0635dde26b96c37f8583c
Notifications: Fixed send content permission checking

Added test and changed logic to properly check the view permissions for
the notification receiver before sending.
Required change to permissions applicator to allow the user to be
manually determined, and a service provider update to provide the class
as a singleton without a specific user, so it checks the current logged
in user on demand.
app/Activity/Notifications/Handlers/BaseNotificationHandler.php
app/Activity/Notifications/NotificationManager.php
app/App/Providers/AppServiceProvider.php
app/Permissions/PermissionApplicator.php
tests/Activity/WatchTest.php