public function checkPrivilegeRequest($privilege, $resource)
    {
        $em = $this->getEntityManager();
        $privilege = trim($privilege);
        $resource = trim($resource);
        // Check the input values.
        if ($resource === '' || $privilege === '') {
            return false;
        }
        // Try to find the privilege request in the database.
        $requestedPrivilege = $em->getRepository('JaztecAcl\Entity\Monitor\RequestedPrivilege')->findOneBy([
            'privilege' => $privilege,
            'resource'  => $resource,
        ]);
        if ($requestedPrivilege instanceof \JaztecAcl\Entity\Monitor\RequestedPrivilege) {
            return true;
        }
        // Create the privilege request.
        $newRequestedPrivilege = new \JaztecAcl\Entity\Monitor\RequestedPrivilege();
        $newRequestedPrivilege
            ->setPrivilege($privilege)
            ->setResource($resource);
        $em->persist($newRequestedPrivilege);
        $em->flush();
        return true;
    }