Changes group's approval mode

        :param require_admin_approval: True or False
        :param thread_id: Group ID to remove people from. See :ref:`intro_threads`
        :raises: FBchatException if request failed
1671
def changeGroupApprovalMode(self, require_admin_approval, thread_id=None):
        
        thread_id, thread_type = self._getThread(thread_id, None)

        data = {"set_mode": int(require_admin_approval), "thread_fbid": thread_id}
        j = self._post(self.req_url.APPROVAL_MODE, data, fix_request=True, as_json=True)
1283815
def request_change_variable(self, py_db, seq, thread_id, frame_id, scope, attr, value):
        '''
        
        '''
        py_db.post_method_as_internal_command(
            thread_id, internal_change_variable, seq, thread_id, frame_id, scope, attr, value)
57566
def edit
      security_transgression_unless @comment.can_be_edited_by?(@user)

      respond_to do |format|
        format.html { redirect_to @thread }
        format.js
      end
    end
1356935
def cli(ctx, group_id, users=None):
    
    return ctx.gi.groups.update_membership(group_id, users=users)
946528
def get_internal_queue(self, thread_id):
        
        if thread_id.startswith('__frame__'):
            thread_id = thread_id[thread_id.rfind('|') + 1:]
        return self._cmd_queue[thread_id]
692202
def remove_topic(self, topic_id):
        
        comment_start = 0
        while comment_start is not None:
            comments = self.list_comments(topic_id, comment_start)
            for comment in comments['results']:
                self.remove_comment(topic_id, comment['id'])
            comment_start = comments['next_start']
        return self.api.req(API_GROUP_REMOVE_TOPIC % topic_id, params={'ck': self.api.ck()})
85953
static function removeByID( $workflow_id, $workflow_version, $group_id )
    {
        eZPersistentObject::removeObject( eZWorkflowGroupLink::definition(),
                                          array("workflow_id" => $workflow_id,
                                                "workflow_version" =>$workflow_version,
                                                "group_id" => $group_id ) );
    }
1226601
def remove(self, block_id):
        
        with self._mutex:
            entry = self._block_map[block_id]
            self._queue.remove(entry)
618509
def update_membership_memberships(self, group_id, membership_id, moderator=None, workflow_state=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - group_id
        """ID"""
        path["group_id"] = group_id

        # REQUIRED - PATH - membership_id
        """ID"""
        path["membership_id"] = membership_id

        # OPTIONAL - workflow_state
        """Currently, the only allowed value is "accepted""""
        if workflow_state is not None:
            self._validate_enum(workflow_state, ["accepted"])
            data["workflow_state"] = workflow_state

        # OPTIONAL - moderator
        """no description"""
        if moderator is not None:
            data["moderator"] = moderator

        self.logger.debug("PUT /api/v1/groups/{group_id}/memberships/{membership_id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/groups/{group_id}/memberships/{membership_id}".format(**path), data=data, params=params, single_item=True)
1033885
static function activateApproval( $approvalID )
    {
        $collaborationItem = eZCollaborationItem::fetch( $approvalID );
        if ( $collaborationItem !== null )
        {
            $collaborationItem->setAttribute( 'data_int3', self::STATUS_WAITING );
            $collaborationItem->setAttribute( 'status', eZCollaborationItem::STATUS_ACTIVE );
            $timestamp = time();
            $collaborationItem->setAttribute( 'modified', $timestamp );
            $collaborationItem->store();
            $participantList = eZCollaborationItemParticipantLink::fetchParticipantList( array( 'item_id' => $approvalID ) );
            foreach( $participantList as $participantLink )
            {
                $collaborationItem->setIsActive( true, $participantLink->attribute( 'participant_id' ) );
            }
            return true;
        }
        return false;
    }
1337795
def deletegroup(self, group_id):
        
        request = requests.delete(
            '{0}/{1}'.format(self.groups_url, group_id),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        return request.status_code == 200
878493
def fetchGroupInfo(self, *group_ids):
        
        threads = self.fetchThreadInfo(*group_ids)
        groups = {}
        for id_, thread in threads.items():
            if thread.type == ThreadType.GROUP:
                groups[id_] = thread
            else:
                raise FBchatUserError("Thread {} was not a group".format(thread))

        return groups
783864
def markAsSpam(self, thread_id=None):
        
        thread_id, thread_type = self._getThread(thread_id, None)
        r = self._post(self.req_url.MARK_SPAM, {"id": thread_id})
        return r.ok
675463
def permission_delete(self, token, id):
        
        return self._realm.client.delete(
            '{}/{}'.format(self.well_known['policy_endpoint'], id),
            headers=self.get_headers(token)
        )
73513
def _changeGroupImage(self, image_id, thread_id=None):
        
        thread_id, thread_type = self._getThread(thread_id, None)

        data = {"thread_image_id": image_id, "thread_id": thread_id}

        j = self._post(self.req_url.THREAD_IMAGE, data, fix_request=True, as_json=True)
        return image_id
1230635
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids)
        return super(ApiObjectGroupPermissionGeneral, self).delete(url)
1078251
def deletegroupmember(self, group_id, user_id):
        
        request = requests.delete(
            '{0}/{1}/members/{2}'.format(self.groups_url, group_id, user_id),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return True