mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-11-14 18:18:51 +01:00
fix: attempt to fix feature recursion (#1121)
This commit is contained in:
1 parent
8386535251
commit
e84df9059e
7 files changed
+9
-8
No files matched your search
@@ -16,6 +16,6 @@ class AllowAudioStreams
|
||||
return true;
|
||||
}
|
||||
|
||||
return Feature::for(null)->value(static::class);
|
||||
return Feature::driver()->get(static::class, null);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ class AllowScriptDownloading
|
||||
return true;
|
||||
}
|
||||
|
||||
return Feature::for(null)->value(static::class);
|
||||
return Feature::driver()->get(static::class, null);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ class AllowSubmission
|
||||
return true;
|
||||
}
|
||||
|
||||
return Feature::for(null)->value(static::class);
|
||||
return Feature::driver()->get(static::class, null);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ class AllowVideoStreams
|
||||
return true;
|
||||
}
|
||||
|
||||
return Feature::for(null)->value(static::class);
|
||||
return Feature::driver()->get(static::class, null);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user