From d47213b22a1686dffa6c763030a595f7bf455499 Mon Sep 17 00:00:00 2001 From: doefom Date: Sun, 2 Jun 2024 09:08:36 +0200 Subject: [PATCH] Improve 'shouldApplyRestriction' function in Restrict.php --- src/Restrict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Restrict.php b/src/Restrict.php index 3833372..45864b5 100644 --- a/src/Restrict.php +++ b/src/Restrict.php @@ -13,6 +13,6 @@ class Restrict */ public static function shouldApplyRestriction(?User $user): bool { - return Statamic::isCpRoute() && $user && ! $user->isSuper(); + return Statamic::isCpRoute() && $user?->isSuper() === false; } }