ldc-boutique-cnc-sable/app/Policies/Backend/SettingPolicy.php
Jérémy Munsch 4d6ff9b726
fix(SettingPolicy): enable Arcadia refresh job dispatching
The Arcadia refresh job dispatching is currently disabled and needs to be enabled when the API is available.
2026-10-29 15:26:45 +01:00

37 lines
1,008 B
PHP

<?php
declare(strict_types=1);
namespace App\Policies\Backend;
use App\Dto\SettingDto;
use App\Models\Customer;
use App\Models\Setting;
use App\Models\User;
class SettingPolicy
{
public function view(User | Customer $user, Setting | SettingDto | null $_ = null): bool
{
// FIXME: The Arcadia refresh job dispatching is currently disabled and needs to be enabled when api will be available.
return false;
// if ($user instanceof Customer) {
// return false;
// }
// return $user->role->isAtLeastEqualsTo(UserRole::Admin);
}
public function update(User | Customer $user, Setting | SettingDto | null $_ = null): bool
{
// FIXME: The Arcadia refresh job dispatching is currently disabled and needs to be enabled when api will be available.
return false;
// if ($user instanceof Customer) {
// return false;
// }
// return $user->role->isAtLeastEqualsTo(UserRole::Admin);
}
}