ldc-boutique-cnc-sable/app/Policies/Backend/SettingPolicy.php

38 lines
1,008 B
PHP
Raw Permalink Normal View History

<?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);
}
}