private function GrantByProperties($guestsOnly, $publish, Date $from = null, Date $to = null, array $groups = array())
    {
        if (!PublishDateUtil::IsPublishedNow($publish, $from, $to))
        {
            return GrantResult::NoAccess();
        }
        if ($this->GetMember() && $guestsOnly)
        {
            return GrantResult::NoAccess();
        }
        if (count($groups) == 0)
        {
            return GrantResult::Allowed();
        }
        if (!$this->GetMember())
        {
            return GrantResult::LoginRequired();
        }
        $groupIDs = Membergroup::GetKeyList($groups);
        $memberGroupIDs = Membergroup::GetKeyList($this->Groups());
        return count(array_intersect($groupIDs, $memberGroupIDs)) ? GrantResult::Allowed() :
            GrantResult::NoAccess();
    }