Delete a group from the group store

@param key key of the group to be deleted
@param user performing the delete operation
545296
public void deleteGroup(String key, IPerson deleter) {

        if (!canDeleteGroup(deleter, key)) {
            throw new RuntimeAuthorizationException(
                    deleter, IPermission.DELETE_GROUP_ACTIVITY, key);
        }

        log.info("Deleting group with key " + key);

        // find the current version of this group entity
        IEntityGroup group = GroupService.findGroup(key);

        // remove this group from the membership list of any current parent
        // groups
        for (IEntityGroup parent : group.getParentGroups()) {
            parent.removeChild(group);
            parent.updateMembers();
        }

        // delete the group
        group.delete();
    }
983022
def delete_group(group_id, purge_data,**kwargs):
    
    user_id = kwargs.get('user_id')
    try:
        group_i = db.DBSession.query(ResourceGroup).filter(ResourceGroup.id == group_id).one()
    except NoResultFound:
        raise ResourceNotFoundError("Group %s not found"%(group_id))

    group_items = db.DBSession.query(ResourceGroupItem).filter(
                                                    ResourceGroupItem.group_id==group_id).all()
    for gi in group_items:
        db.DBSession.delete(gi)

    if purge_data == 'Y':
        _purge_datasets_unique_to_resource('GROUP', group_id)

    log.info("Deleting group %s, id=%s", group_i.name, group_id)

    group_i.network.check_write_permission(user_id)
    db.DBSession.delete(group_i)
    db.DBSession.flush()
1289785
public void identity_user_user_DELETE(String user) throws IOException {
		String qPath = "/me/identity/user/{user}";
		StringBuilder sb = path(qPath, user);
		exec(qPath, "DELETE", sb.toString(), null);
	}
774093
@Override
    public void deleteUser(String username) throws AuthenticationException {
        String user = file_store.getProperty(username);
        if (user == null) {
            throw new AuthenticationException("User '" + username
                    + "' not found.");
        }
        file_store.remove(username);
        try {
            saveUsers();
        } catch (IOException e) {
            throw new AuthenticationException("Error deleting user: ", e);
        }
    }
552301
function (key, devices) {
    if (_.isUndefined(devices)) { // Just create group without any device.
      refs.userGroups.child(key).set(false, function (err) {
        if (!err) debug('Empty group created: ', key);
      });
    } else {
      refs.userGroups.child(key).set(devices);
    }
  }
1331686
public void removeGroup(String group) {

        if (m_fieldsByGroup.get(group) != null) {
            List<I_CmsFormField> fieldsToRemove = new ArrayList<I_CmsFormField>(m_fieldsByGroup.get(group));
            for (I_CmsFormField field : fieldsToRemove) {
                removeField(field);
            }
        }
        m_fieldsByGroup.removeAll(group);
    }
901926
public void deleteGroupMember(Integer groupId, Integer userId) throws IOException {
        String tailUrl = GitlabGroup.URL + "/" + groupId + "/" + GitlabGroupMember.URL + "/" + userId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
245796
def GroupsUsersDelete(self, group_id, user_id):
        
        if self.__SenseApiCall__('/groups/{group_id}/users/{user_id}.json'.format(group_id = group_id, user_id = user_id), 'DELETE'):
            return True
        else:
            self.__error__ = "api call unsuccessful"
            return False
707240
@Override
  public void deleteRow(K key) {
    createMutator().delete(key, getColumnFamily(), null, null);
  }
180015
public static function delete($key, $group = NULL)
	{
		$result = FALSE;
		try {
			!self::classExists() or $result = self::instance($group)->delete($key);
		} catch (Cache_Exception $e) {
			self::exception($e);
		}

		return $result;
	}
866457
public void removeUserFromGroup(String username, String groupname) throws CmsException {

        m_securityManager.removeUserFromGroup(m_context, username, groupname, false);
    }
835070
public void deleteSSHKey(Integer targetUserId, Integer targetKeyId) throws IOException {
        String tailUrl = GitlabUser.USERS_URL + "/" + targetUserId + GitlabSSHKey.KEYS_URL + "/" + targetKeyId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
77337
public function delete($key)
    {
        $this->checkPermissions($key, self::ACTION_DELETE);
        unset($this->scope[$key]);
    }
476476
function group_del_user($group,$user){

        //find the parent dn
        $group_info=$this->group_info($group,array("cn"));
        if ($group_info[0]["dn"]==NULL){ return (false); }
        $group_dn=$group_info[0]["dn"];
        
        //find the child dn
        $user_info=$this->user_info($user,array("cn"));
        if ($user_info[0]["dn"]==NULL){ return (false); }
        $user_dn=$user_info[0]["dn"];

        $del=array();
        $del["member"] = $user_dn;
        
        $result=@ldap_mod_del($this->_conn,$group_dn,$del);
        if ($result==false){ return (false); }
        return (true);
    }
742961
@Override
    public void delete(IEntityGroup group) throws GroupsException {
        if (existsInDatabase(group)) {
            try {
                primDelete(group);
            } catch (SQLException sqle) {
                throw new GroupsException("Problem deleting " + group, sqle);
            }
        }
    }
566596
public void serviceName_users_userId_DELETE(String serviceName, String userId) throws IOException {
		String qPath = "/caas/registry/{serviceName}/users/{userId}";
		StringBuilder sb = path(qPath, serviceName, userId);
		exec(qPath, "DELETE", sb.toString(), null);
	}
620923
@Override
    public void deleteGroup(ILockableEntityGroup group) throws GroupsException {
        throwExceptionIfNotInternallyManaged();
        try {
            if (group.getLock().isValid()) {
                removeDeletedGroupFromParentGroups(group);
                deleteGroup((IEntityGroup) group);
            } else {
                throw new GroupsException(
                        "Could not delete group " + group.getKey() + " has invalid lock.");
            }
        } catch (LockingException le) {
            throw new GroupsException("Could not delete group " + group.getKey(), le);
        } finally {
            try {
                group.getLock().release();
            } catch (LockingException le) {
            }
        }
    }