Phalcon\Acl\Adapter\Redis::allow PHP Method

allow() public method

{@inheritdoc} You can use '*' as wildcard Example: Allow access to guests to search on customers $acl->allow('guests', 'customers', 'search'); Allow access to guests to search or create on customers $acl->allow('guests', 'customers', ['search', 'create']); Allow access to any role to browse on products $acl->allow('*', 'products', 'browse'); Allow access to any role to browse on any resource $acl->allow('*', '*', 'browse');
public allow ( string $role, string $resource, array | string $access, mixed $func = null )
$role string
$resource string
$access array | string
$func mixed
    public function allow($role, $resource, $access, $func = null)
    {
        if ($role !== '*' && $resource !== '*') {
            $this->allowOrDeny($role, $resource, $access, Acl::ALLOW);
        }
        if ($role === '*' || empty($role)) {
            $this->rolePermission($resource, $access, Acl::ALLOW);
        }
        if ($resource === '*' || empty($resource)) {
            $this->resourcePermission($role, $access, Acl::ALLOW);
        }
    }