mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
22 lines
417 B
PHP
22 lines
417 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Features;
|
|
|
|
use App\Enums\Auth\SpecialPermission;
|
|
use App\Models\Auth\User;
|
|
use Laravel\Pennant\Feature;
|
|
|
|
class AllowPlaylistManagement
|
|
{
|
|
public function resolve(?User $user): ?bool
|
|
{
|
|
if ($user?->can(SpecialPermission::BYPASS_FEATURE_FLAGS->value)) {
|
|
return true;
|
|
}
|
|
|
|
return Feature::driver()->get(static::class, null);
|
|
}
|
|
}
|