protected function verifyProtectedEntry(ProtectedMenuEntry $protectedEntry, WebRequest $request)
    {
        // If the user has no session we do not have to check the permissions
        if (!$request->hasSession()) {
            return false;
        }
        
        // If the access level key is empty but the user has a
        // session everything is fine with this entry.
        if ($request->hasSession() && $protectedEntry->getAccessLevelKey() === '') {
            return true;
        }
        
        // Check the permissions
        if ($request->getSession()->hasAccess($protectedEntry->getAccessLevelKey())) {
            return true;
        }
        
        // If the user has no access to the database we return false
        return false;
    }