<?php

namespace App\Policies;

use App\Models\User;

class BackupPolicy
{
    public function viewAny(User $user): bool
    {
        return $user->isSuperAdmin() || $user->isAdminTU() || $user->hasPermissionTo('backup.manage');
    }

    public function create(User $user): bool
    {
        return $user->isSuperAdmin() || $user->isAdminTU() || $user->hasPermissionTo('backup.manage');
    }

    public function restore(User $user): bool
    {
        return $user->isSuperAdmin() || $user->hasPermissionTo('backup.manage');
    }

    public function delete(User $user): bool
    {
        return $user->isSuperAdmin() || $user->hasPermissionTo('backup.manage');
    }
}
