returns true if the group has no user or user group restriction.

@return bool
423698
public function IsPublic()
    {
        $bIsPublic = true;

        if (!$this->IsActive()) {
            $bIsPublic = false;
        }

        if ($bIsPublic) {
            $oGroups = $this->GetFieldDataExtranetGroupList();
            if ($oGroups->Length() > 0) {
                $bIsPublic = false;
            }
        }

        if ($bIsPublic) {
            $oUsers = $this->GetFieldDataExtranetUserList();
            if ($oUsers->Length() > 0) {
                $bIsPublic = false;
            }
        }

        return $bIsPublic;
    }
797114
def has_group(user, group_name):
    '''
    
    '''
    if user.groups.filter(name=group_name).exists():
        return True
    return False
737558
public function findUsersWithNoGroup()
    {
        $query = $this->find();

        return $query->leftJoin(
                [$this->UsersGroups->alias() => $this->UsersGroups->table()],
                [$this->aliasField('id') . ' = ' . $this->UsersGroups->aliasField('user_id')]
            )
            ->select([
                'Users.id',
                'group_count' => $query->func()->count('UsersGroups.group_id')
            ])
            ->group('Users.id')
            ->having('group_count = 0');
    }
1103648
public function isPrivate(): bool
    {
        if ($this->is_private !== null) {
            return $this->is_private;
        }

        $this->is_private = false;
        foreach (static::$private_ranges as $range) {
            if ($this->isIn($range)) {
                $this->is_private = true;
                break;
            }
        }

        return $this->is_private;
    }
492096
private function getUserGroup()
    {
        if (null !== $token = $this->tokenStorage->getToken()) {
            /** @var \Ekyna\Bundle\UserBundle\Model\UserInterface $user */
            if (null !== $user = $token->getUser()) {
                return $user->getGroup();
            }
        }
        return null;
    }
618314
protected function checkUserGroup()
    {
        $isValid = true;

        $payPalPayment = $this->getPayment();
        $groups = $payPalPayment->getGroups();

        if ($groups && $groups->count() > 0) {
            $isValid = $this->isUserAssignedToGroup($groups);
        }

        return $isValid;
    }
854834
public function isInGroup(string $groupName, int $fd): bool
    {
        return $this->useRedis(function($resource, $redis) use($groupName, $fd){
            $key = $this->getGroupNameKey($groupName);
            $redis->sIsMember($key, $fd);
        });
    }
811102
private function isSkipTable(): bool
    {
        $config = (array)Configure::read('RolesCapabilities.ownerCheck.skipTables.byInstance');
        if (in_array(get_class($this->table), $config)) {
            return true;
        }

        $config = (array)Configure::read('RolesCapabilities.ownerCheck.skipTables.byRegistryAlias');
        if (in_array($this->table->getRegistryAlias(), $config)) {
            return true;
        }

        $config = (array)Configure::read('RolesCapabilities.ownerCheck.skipTables.byTableName');
        if (in_array($this->table->getTable(), $config)) {
            return true;
        }

        return false;
    }
1235176
public function hasGroupPermission(Group $group)
    {
        $definitions = (new Query())->select("nav_id")->from("cms_nav_permission")->where(['group_id' => $group->id])->all();
        
        // the group has no permission defined, this means he can access ALL cms pages
        if (count($definitions) == 0) {
            return true;
        }
        
        foreach ($definitions as $permission) {
            if ($this->id == $permission['nav_id']) {
                return true;
            }
        }
        
        return false;
    }
886951
private function isEnabled()
    {
        if (!$this->enabled) {
            return false;
        }

        if ($this->authorizationChecker) {
            foreach ($this->trustedRoles as $trustedRole) {
                if ($this->authorizationChecker->isGranted($trustedRole)) {
                    return false;
                }
            }
        }

        return true;
    }
329104
public function list_usergroups()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/list/usergroup');

        return $this->process_response($response);
    }
649171
public function isSecurityUser()
    {
        if ($this->securityUser) {
            return true;
        }
        
        /** @var PreAuthenticatedToken $token */
        if (($token = $this->tokenStorage->getToken())
            && ($user = $token->getUser()) instanceof UserInterface ) {
            $this->securityUser = $user;
            return true;
        }
        return false;
    }
702570
public function isDeletable()
    {
        $user = $this->getAuthenticatedUser();

        if ( empty( $user ) )
        {
            return false;
        }

        $root = $this->getRootParagraph();

        return ! empty( $root->editUsers ) && in_array( $user->id, $root->editUsers )
            || ! empty( $root->editGroups ) && in_array( $user->groupId, $root->editGroups )
            || $this->getServiceLocator()
                    ->get( 'Grid\User\Model\Permissions\Model' )
                    ->isAllowed( $root, $this->id == $this->rootId ? 'delete' : 'edit' );
    }
17859
protected function hasAggregates() {
		if ($this->groups) {
			return true;
		}
		foreach ($this->columns as $column) {
			if (strpos($column, '(') !== false) {
				return true;
			}
		}
		return false;
	}
555666
public function hasAccessRestrictions()
    {
        if (!is_array($this->accessRoles) || empty($this->accessRoles)) {
            return false;
        }
        if (count($this->accessRoles) === 1 && in_array('Neos.Flow:Everybody', $this->accessRoles)) {
            return false;
        }

        return true;
    }
853766
public function isAdmin(): bool
    {
        return $this->isLoggedIn()
            && isset($this->session->get('user')['admin'])
            && $this->session->get('user')['admin'] === true;
    }
26934
private function Groups()
    {
        if ($this->groups === null)
        {
            $this->groups = array();
            if ($this->GetMember())
            {
                $this->groups = MembergroupUtil::MemberMembergroups($this->GetMember());
            }
        }
        return $this->groups;
    }