<?php

namespace App\Policies;

use App\Models\Dsar\Dsar;
use App\Models\Dsar\DsarTranche;
use App\Models\User\User;

class DsarPolicy {

    public function viewAny(User $user): bool {
        return $user->can('dsars.view');
    }

    public function view(User $user, Dsar $dsar): bool {
        return $user->can('dsars.view');
    }

    public function logResponse(User $user, Dsar $dsar): bool {
        return $user->can('dsars.responses.log');
    }

    public function viewTranche(User $user, DsarTranche $tranche): bool {
        return $user->can('dsars.tranche.view');
    }

    public function sendBatch(User $user, DsarTranche $tranche): bool {
        return $user->can('dsars.batch.send');
    }
}
