From: Dan Brown Date: Thu, 17 Aug 2023 13:59:28 +0000 (+0100) Subject: Notifications: Fixed issues causing failing tests X-Git-Tag: v23.08~1^2~13^2~2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/ee9e342b58a57ae909f0635dde26b96c37f8583c Notifications: Fixed issues causing failing tests - Ensured watch options passed in all meta template usage to fix failing scenarios where watch options did not exist. - Fixed testing issue caused by guest user permission caching. --- diff --git a/app/Users/Models/User.php b/app/Users/Models/User.php index 08cab69fb..be3e9b9b3 100644 --- a/app/Users/Models/User.php +++ b/app/Users/Models/User.php @@ -88,8 +88,6 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon /** * This holds the default user when loaded. - * - * @var null|User */ protected static ?User $defaultUser = null; @@ -107,6 +105,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon return static::$defaultUser; } + public static function clearDefault(): void + { + static::$defaultUser = null; + } + /** * Check if the user is the default public user. */ diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 0fb98e304..75b01a379 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -70,7 +70,7 @@
{{ trans('common.details') }}