Set the list of approvers.  Important: Approvers and groups not
in the request will be removed

EE only.
769492
public GitlabMergeRequestApprovals setMergeRequestApprovers(GitlabMergeRequest mr,
                                                                Collection<Integer> userApproverIds,
                                                                Collection<Integer> groupApproverIds) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(mr.getProjectId()) +
                GitlabMergeRequest.URL + "/" + mr.getIid() + GitlabMergeRequestApprovals.APPROVERS_URL;
        return put()
            .with("approver_ids", userApproverIds)
            .with("approver_group_ids", groupApproverIds)
            .to(tailUrl, GitlabMergeRequestApprovals.class);
    }
1001224
def remove_from_group(server_context, user_ids, group_id, container_path=None):
    
    return __make_security_group_api_request(server_context, 'removeGroupMember.api', user_ids,
                                             group_id, container_path)
87337
def group_permissions(self, group, perm, obj, approved=True):
        
        return self.get_for_model(obj).select_related(
            'user', 'group', 'creator').filter(group=group, codename=perm,
                                               approved=approved)
247136
def set_managers(sender, **kwargs):
    
    cls = sender
   
    if issubclass(cls, ModelBase):
        cls.add_to_class('permitted', PermittedManager())
706628
def action_to_approve(self):
        """"""
        template = self.env.ref(
            'document_page_approval.email_template_new_draft_need_approval')
        approver_gid = self.env.ref(
            'document_page_approval.group_document_approver_user')
        for rec in self:
            if rec.state != 'draft':
                raise UserError(
                    _("Can't approve pages in '%s' state.") % rec.state)
            if not (rec.am_i_owner or rec.am_i_approver):
                raise UserError(
                    _('You are not authorized to do this.\r\n'
                      'Only owners or approvers can request approval.'))
            # request approval
            if rec.is_approval_required:
                rec.write({'state': 'to approve'})
                guids = [g.id for g in rec.page_id.approver_group_ids]
                users = self.env['res.users'].search([
                    ('groups_id', 'in', guids),
                    ('groups_id', 'in', approver_gid.id)])
                rec.message_subscribe_users([u.id for u in users])
                rec.message_post_with_template(template.id)
            else:
                # auto-approve if approval is not required
                rec.action_approve()
1031374
public void setUserList(java.util.Collection<User> userList) {
        if (userList == null) {
            this.userList = null;
            return;
        }

        this.userList = new java.util.ArrayList<User>(userList);
    }
952575
def setSubDelegates(self, namelist, before=None, after=None):
        """"""
        if len(namelist) > 1:
            def set_sub(i):
                i.setSubDelegates(namelist[1:], before, after)
            self.setBeforeDelegate(namelist[0], set_sub)
        elif len(namelist) == 1:
            self.setDelegate(namelist[0], before, after)
189242
private void resetComponents() {
        defineGroupsLayout.resetComponents();
        editRolloutEnabled = false;
        rolloutName.clear();
        targetFilterQuery.clear();
        resetFields();
        enableFields();
        populateDistributionSet();
        populateTargetFilterQuery();
        setDefaultSaveStartGroupOption();
        groupsLegendLayout.reset();
        groupSizeLabel.setVisible(false);
        noOfGroups.setVisible(true);
        removeComponent(1, 2);
        addComponent(targetFilterQueryCombo, 1, 2);
        addGroupsLegendLayout();
        addGroupsDefinitionTabs();

        actionTypeOptionGroupLayout.selectDefaultOption();
        autoStartOptionGroupLayout.selectDefaultOption();
        totalTargetsCount = 0L;
        rollout = null;
        groupsDefinitionTabs.setVisible(true);
        groupsDefinitionTabs.setSelectedTab(0);

        approvalLabel.setVisible(false);
        approvalButtonsLayout.setVisible(false);
        approveButtonsGroup.clear();
        approvalRemarkField.clear();
        approveButtonsGroup.removeAllValidators();
    }
1075470
def permitted(refresh = false)
      @permitted = nil if refresh
      @permitted ||=
          if require_admin?
            'Administrators Only'
          elsif require_anon?
            'Anonymous Only'
          elsif allow_anon?
            'Everyone'
          elsif groups.any?
            names = groups.pluck(:name).map{|v| "\"#{v}\""}
            'Members of ' +
                if names.count == 1
                  names.first
                elsif names.count == 2
                  names.join(' or ')
                else
                  names[0...-1].join(', ') + ', or ' + names.last
                end
          else
            'All Users'
          end +
              if non_standard
                ' (Non-Standard)'
              else
                ''
              end
    end
164073
public function markApproved()
    {
        $this->IsSpam = false;
        $this->Moderated = true;
        $this->write();
        $this->extend('afterMarkApproved');
    }
230491
public void setAuthorizationRules(java.util.Collection<AuthorizationRule> authorizationRules) {
        if (authorizationRules == null) {
            this.authorizationRules = null;
            return;
        }

        this.authorizationRules = new com.amazonaws.internal.SdkInternalList<AuthorizationRule>(authorizationRules);
    }
1216137
public void setRuleGroups(java.util.Collection<SubscribedRuleGroupSummary> ruleGroups) {
        if (ruleGroups == null) {
            this.ruleGroups = null;
            return;
        }

        this.ruleGroups = new java.util.ArrayList<SubscribedRuleGroupSummary>(ruleGroups);
    }
762823
def updateGroup(self, group, vendorSpecific=None):
        
        response = self.updateGroupResponse(group, vendorSpecific)
        return self._read_boolean_response(response)
968361
def set(self, permissions):
        
        parent_url = self.client.get_url(self.parent_object._manager._URL_KEY, 'GET', 'single', {'id': self.parent_object.id})
        target_url = parent_url + self.client.get_url_path(self._URL_KEY, 'PUT', 'multi')
        r = self.client.request('PUT', target_url, json=permissions)
        if r.status_code != 201:
            raise exceptions.ServerError("Expected 201 response, got %s: %s" % (r.status_code, target_url))
        return self.list()
462522
public void setUsers(final List<User> users)
    {
        synchronized(this.getUsers())
        {
            if(users != this.getUsers())
            {
                this.getUsers().clear();
                
                if(users != null)
                {
                    this.getUsers().addAll(users);
                }
            }
        }
    }
473640
def set_forbidden_statuses(self, statuses):
        
        if self._forbidden_status == statuses:
            return
        self._forbidden_status = statuses
        self.invalidateFilter()
1319497
def list_users
      update_users(:include_joins_and_parts) do
        users.values.each do |user|
          status = (user.idle? ? "G" : "H") + (user.admin? ? "@" : "")
          client.numeric_reply :rpl_whoreply, channel, user.account, user.server,
            "camper_van", user.nick, status, ":0 #{user.name}"
        end
        client.numeric_reply :rpl_endofwho, channel, "End of WHO list"
      end
    end