<?php
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2019 Timble CVBA (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */

namespace Foliolabs\Docman\Site;

use Foliolabs\Docman;

/**
 * Submit controller permissions
 */
class ControllerPermissionSubmit extends Docman\ControllerPermissionDocument
{
    public function canBrowse()
    {
        return false;
    }

    /**
     * Submit view is meant to be used with new items only
     *
     * @return bool
     */
    public function canRead()
    {
        return !($this->getModel()->getState()->isUnique());
    }

    public function canEdit()
    {
        return false;
    }

    public function canDelete()
    {
        return false;
    }
}