mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
fix: attempt to fix feature recursion (#1121)
This commit is contained in:
@@ -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