Skip to content

Commit

Permalink
fixes #371
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed May 14, 2024
1 parent 7f43b0a commit 7edc3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FilamentShield.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function generateForWidget(string $widget): void

protected static function giveSuperAdminPermission(string | array | Collection $permissions): void
{
if (! Utils::isSuperAdminDefinedViaGate()) {
if (! Utils::isSuperAdminDefinedViaGate() && Utils::isSuperAdminEnabled()) {
$superAdmin = static::createRole();

$superAdmin->givePermissionTo($permissions);
Expand Down

0 comments on commit 7edc3b3

Please sign in to comment.