mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
22 lines
415 B
PHP
22 lines
415 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 AllowAudioStreams
|
|
{
|
|
public function resolve(?User $user): bool
|
|
{
|
|
if (filled($user?->can(SpecialPermission::BYPASS_FEATURE_FLAGS->value))) {
|
|
return true;
|
|
}
|
|
|
|
return Feature::for(null)->value(static::class);
|
|
}
|
|
}
|