fix: attempt to fix feature recursion (#1121)

This commit is contained in:
Kyrch
2026-03-05 17:04:19 -03:00
committed by GitHub
parent 8386535251
commit e84df9059e
7 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ class AllowAudioStreams
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Features;
use App\Constants\FeatureConstants;
use App\Enums\Auth\SpecialPermission;
use App\Models\Auth\User;
use Laravel\Pennant\Feature;
@@ -16,6 +17,6 @@ class AllowDumpDownloading
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
@@ -16,6 +16,6 @@ class AllowExternalProfileManagement
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
+2 -2
View File
@@ -10,12 +10,12 @@ use Laravel\Pennant\Feature;
class AllowPlaylistManagement
{
public function resolve(?User $user): bool
public function resolve(?User $user): ?bool
{
if ($user?->can(SpecialPermission::BYPASS_FEATURE_FLAGS->value)) {
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
+1 -1
View File
@@ -16,6 +16,6 @@ class AllowScriptDownloading
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
+1 -1
View File
@@ -16,6 +16,6 @@ class AllowSubmission
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}
+1 -1
View File
@@ -16,6 +16,6 @@ class AllowVideoStreams
return true;
}
return Feature::for(null)->value(static::class);
return Feature::driver()->get(static::class, null);
}
}