public function allow(string $role, string $permission, string $resource, bool $status=null)
    {
        $status = $status ?? true;
        if (!$this->roleRegistry->exists($role)) {
            throw new \Exception(
                sprintf(
                    "The role: %s doesnt exist",
                    (string)$role
                )
            );
        }

        if (!$this->permissionRegistry->exists($permission)) {
            throw new \Exception(
                sprintf(
                    "The permission: %s doesnt exist",
                    (string)$permission
                )
            );
        }

        if (!$this->resourceRegistry->exists($resource)) {
            throw new \Exception(
                sprintf(
                    "The resource: %s doesnt exist",
                    (string)$resource
                )
            );
        }

        $this->globalRegistry->save($role, $resource, $permission, $status);
    }