Delete all permission for a $groupId for paths (Plugin.Controller.action)
that are no longer present in the codebase.

@param string $groupId The group id.
@param array $actionMap The action map.
@return void
336829
public function deleteOrphans($groupId, array $actionMap)
    {
        $groupPermissions = $this->getAllPermissionPathsForGroup($groupId);

        $orphans = array_diff($groupPermissions, array_keys($actionMap));

        if (!empty($orphans)) {
            $this->deleteAll([
                'group_id' => $groupId,
                'path IN' => $orphans
            ]);
        }
    }
861880
public function deletGroup($groupId)
    {
        $result = $this->httpRaw(self::WECHAT_GROUP_DELETE_PREFIX, [
            'group' => [
                'id' => $groupId
            ]
        ], [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'ok';
    }
168112
public function getAllPermissionPathsForGroup($groupId)
    {
        $groupPermissions = $this->find('all')
            ->select('path')
            ->where(['group_id' => $groupId])
            ->hydrate(false)
            ->toArray();

        return Hash::extract($groupPermissions, '{n}.path');
    }
1010679
@Override
	public void removeByGroupId(long groupId) {
		for (CPSpecificationOption cpSpecificationOption : findByGroupId(
				groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpSpecificationOption);
		}
	}
990655
public function deleteGroup($groupId)
    {
        try {
            return $this->innerGateway->deleteGroup($groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
557546
public static function delete_groupings($groupingids) {
        global $CFG, $DB;
        require_once("$CFG->dirroot/group/lib.php");

        $params = self::validate_parameters(self::delete_groupings_parameters(), array('groupingids'=>$groupingids));

        $transaction = $DB->start_delegated_transaction();

        foreach ($params['groupingids'] as $groupingid) {

            if (!$grouping = groups_get_grouping($groupingid)) {
                // Silently ignore attempts to delete nonexisting groupings.
                continue;
            }

            // Now security checks.
            $context = context_course::instance($grouping->courseid);
            try {
                self::validate_context($context);
            } catch (Exception $e) {
                $exceptionparam = new stdClass();
                $exceptionparam->message = $e->getMessage();
                $exceptionparam->courseid = $grouping->courseid;
                throw new moodle_exception('errorcoursecontextnotvalid' , 'webservice', '', $exceptionparam);
            }
            require_capability('moodle/course:managegroups', $context);

            groups_delete_grouping($grouping);
        }

        $transaction->allow_commit();
    }
948141
public function groupDelete($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupDeleteUrl, $data);
    }
63166
public function processGroupAction($groupAction = null, $conditions = null) {
		if (($groupAction === false) || empty($conditions)) {
			return null;
		}

		$result = false;
		switch ($groupAction) {
			case 'group-data-del':
				$result = $this->deleteAll($conditions, false);
				break;
		}

		return $result;
	}
50106
public function deleteShopGroup($groupId)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_GROUP_DELETE_URL . 'access_token=' . $this->getAccessToken(), [
            'group_id' => $groupId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
1356188
@Override
	public void removeByGroupId(long groupId) {
		for (CommerceDiscount commerceDiscount : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceDiscount);
		}
	}
873492
public void removeGroup(int groupId) {
        PreparedStatement statement = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_GROUPS
                    + " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, groupId);
            statement.executeUpdate();
            statement.close();

            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_OVERRIDE +
                    " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ?"
            );

            statement.setInt(1, groupId);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
        removeGroupIdFromTablePaths(groupId);
    }
972667
public function removeGroup(GroupInterface $group)
	{
		if ($this->inGroup($group))
		{
			$this->groups()->detach($group);
			$this->invalidateUserGroupsCache();
			$this->invalidateMergedPermissionsCache();
		}

		return true;
	}
343700
@Override
	public void removeByGroupId(long groupId) {
		for (CPOptionValue cpOptionValue : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpOptionValue);
		}
	}
1230635
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids)
        return super(ApiObjectGroupPermissionGeneral, self).delete(url)
505088
@RequestMapping(value = "ldap-mapping/{id}/delete", method = RequestMethod.DELETE)
    public Ack deleteMapping(@PathVariable ID id) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return accountGroupMappingService.deleteMapping(
                LDAPExtensionFeature.LDAP_GROUP_MAPPING,
                id
        );
    }
871599
function(groupName, callback) {
        var url = this.getResourceUrl({ path: '/groups/' + groupName, user: null });
        request.del(this.getSignedResourceUrl('DELETE', url), callback);

        return this;
    }
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);
    }