Backend\Core\Engine\Base\Widget::isAllowed PHP Method

isAllowed() public method

Is this widget allowed for this user?
public isAllowed ( ) : boolean
return boolean
    public function isAllowed()
    {
        foreach ($this->rights as $rights) {
            list($module, $action) = explode('/', $rights);
            // check action rights
            if (isset($module) && isset($action)) {
                if (!BackendAuthentication::isAllowedAction($action, $module)) {
                    return false;
                }
            }
        }
        return true;
    }