<?php

namespace Assetise\Scheduler\Policies;

use Illuminate\Foundation\Auth\User as Authenticatable;

trait SchedulerExim
{

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

        return false;
    }

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

        return false;
    }
}