Phalcon\Acl\Adapter\Mongo::allowOrDeny PHP Method

allowOrDeny() protected method

Inserts/Updates a permission in the access list
protected allowOrDeny ( string $roleName, string $resourceName, string $access, integer $action )
$roleName string
$resourceName string
$access string
$action integer
    protected function allowOrDeny($roleName, $resourceName, $access, $action)
    {
        if (!$this->isRole($roleName)) {
            throw new Exception('Role "' . $roleName . '" does not exist in the list');
        }
        if (!is_array($access)) {
            $access = [$access];
        }
        foreach ($access as $accessName) {
            $this->insertOrUpdateAccess($roleName, $resourceName, $accessName, $action);
        }
    }