<?php

namespace Eform\Instruction\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait InstructionsExim
{

    /**
     * Determine if the given user can approve the given instructions.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function import(Authenticatable $user)
    {
        if ($user->canDo('instruction.instructions.import')) {
            return true;
        }

        return false;
    }

    /**
     * Determine if the given user can approve the given instructions.
     *
     * @param Authenticatable $user
     *
     * @return bool
     */
    public function export(Authenticatable $user)
    {
        if ($user->canDo('instruction.instructions.export')) {
            return true;
        }

        return false;
    }
}