Edit shares for a config.

        :param id: Config ID as an int.
        :param user_ids: User IDs as int list.
        :return: :class:`cdrouter.Share <cdrouter.Share>` list
429437
def edit_shares(self, id, user_ids): # pylint: disable=invalid-name,redefined-builtin
        
        return self.service.edit_shares(self.base, id, user_ids)
248805
def maybe_readable_combine_ids(cls, ids):
    
    ids = list(ids)  # We can't len a generator.
    return ids[0] if len(ids) == 1 else cls.combine_ids(ids)
1280077
def accept_remote_share(self, share_id):
        
        if not isinstance(share_id, int):
            return False

        res = self._make_ocs_request(
            'POST',
            self.OCS_SERVICE_SHARE,
            'remote_shares/pending/' + str(share_id)
        )
        if res.status_code == 200:
            return res
        raise HTTPResponseError(res)
96209
def request_get_user(self, user_ids) -> dict:
        
        method_params = {'user_ids': user_ids}
        response = self.session.send_method_request('users.get', method_params)
        self.check_for_errors('users.get', method_params, response)
        return response
49984
def sharing_agreement_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/sharing_agreements/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1348904
def download_users(id)
      doc = permissions_doc(id)
      return [] if doc.nil?
      users = Array(doc[self.class.read_user_field]) + Array(doc[self.class.edit_user_field])
      Rails.logger.debug("[CANCAN] download_users: #{users.inspect}")
      users
    end
1349424
def compute_extension_rights(self, ids):
        
        content = self._serialize.body(ids, '[str]')
        response = self._send(http_method='POST',
                              location_id='5f1dbe21-f748-47c7-b5fd-3770c8bc2c08',
                              version='5.0-preview.1',
                              content=content)
        return self._deserialize('{bool}', self._unwrap_collection(response))
314011
def set_joint_mode(self, ids):
        
        self.set_control_mode(dict(zip(ids, itertools.repeat('joint'))))
503965
def get_user_organizers(self, id, **data):
        
        
        return self.get("/users/{0}/organizers/".format(id), data=data)
161869
def use(self, id):
        
        if self._connected and id > 0:
            self.send_command('use', keys={'sid': id})
1047077
def user_ids=(values)
      values ||= []
      values = [ values ] unless values.is_a?(::Array)
      values = values.reject{|v| v.blank?}.map{|v| v.to_i}
      self.users = Incline::User.where(id: values).to_a
    end
1272930
def delete_by_ids(self, ids):
        
        ids = utils.coerce_to_list(ids)
        uri = "/%s?ids=%s" % (self.uri_base, ",".join(ids))
        return self.api.method_delete(uri)
1079257
public void setHostIds(java.util.Collection<String> hostIds) {
        if (hostIds == null) {
            this.hostIds = null;
            return;
        }

        this.hostIds = new com.amazonaws.internal.SdkInternalList<String>(hostIds);
    }
935998
def put(self, id=None):
        

        toa = self.request.headers.get("Caesium-TOA")

        if not toa:
            self.raise_error(400, "Caesium-TOA header is required, none found")
            self.finish(self.request.headers.get("Caesium-TOA"))

        meta = self._get_meta_data()
        meta["bulk_id"] = uuid.uuid4().get_hex()
        ids = self.get_json_argument("ids")
        patch = self.get_json_argument("patch")

        self.get_json_argument("ids", [])
        for id in ids:
            stack = AsyncSchedulableDocumentRevisionStack(self.client.collection_name, self.settings, master_id=id)
            stack.push(patch, toa=toa, meta=meta)

        self.write({
            "count": len(ids),
            "result": {
                "ids": ids,
                "toa": toa,
                "patch": patch,
            }
        })
        self.finish()
1313102
def reassign(self, user_ids, requester):
        
        path = '{0}'.format(self.collection.name)
        assignments = []
        if not user_ids:
            raise Error('Must pass at least one user id')
        for user_id in user_ids:
            ref = {
                "assignee": {
                    "id": user_id,
                    "type": "user_reference"
                }
            }
            assignments.append(ref)
        data = {
            "incidents": [
                {
                    "id": self.id,
                    "type": "incident_reference",
                    "assignments": assignments
                }
            ]
        }
        extra_headers = {"From": requester}
        return self.pagerduty.request('PUT', path, data=_json_dumper(data), extra_headers=extra_headers)
1089317
def update_user_attributes(self, id, old_attrs, new_attrs):
        
        from alerta.utils.collections import merge
        merge(old_attrs, new_attrs)
        attrs = {k: v for k, v in old_attrs.items() if v is not None}
        update = {
            '$set': {'attributes': attrs}
        }
        response = self.get_db().users.update_one({'_id': {'$regex': '^' + id}}, update=update)
        return response.matched_count > 0
514112
def cli(ctx, group, user):
    
    return ctx.gi.users.add_to_group(group, user)