<?php

namespace Bixo\Map\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait UnitExim
{

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

        return false;
    }

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

        return false;
    }
}