public function filterByAssignable()
    {
        if (Config::get('concrete.permissions.model') != 'simple') {
            // there's gotta be a more reasonable way than this but right now i'm not sure what that is.
            $excludeGroupIDs = [GUEST_GROUP_ID, REGISTERED_GROUP_ID];
            $db = Loader::db();
            $r = $db->executeQuery('select gID from ' . $db->getDatabasePlatform()->quoteSingleIdentifier('Groups') . ' where gID > ?', [REGISTERED_GROUP_ID]);
            while ($row = $r->FetchRow()) {
                $g = Group::getByID($row['gID']);
                $gp = new Permissions($g);
                if (!$gp->canAssignGroup()) {
                    $excludeGroupIDs[] = $row['gID'];
                }
            }
            $this->query->andWhere(
                $this->query->expr()->notIn('g.gId', array_map([$db, 'quote'], $excludeGroupIDs))
            );
        }
    }