apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ItemController.java/ItemController/deleteItem
class ItemController:  @PreAuthorize(value = "@permissionValidator.hasModifyNamespacePermission(#appId, #namespaceName, #env) ")
  @DeleteMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{itemId}")
  public void deleteItem(@PathVariable String appId, @PathVariable String env,
                         @PathVariable String clusterName, @PathVariable String namespaceName,
                         @PathVariable long itemId) {
    ItemDTO item = configService.loadItemById(Env.valueOf(env), itemId);
    NamespaceDTO namespace = namespaceService.loadNamespaceBaseInfo(appId, Env.valueOf(env), clusterName, namespaceName);

    // In case someone constructs an attack scenario
    if (namespace == null || item.getNamespaceId() != namespace.getId()) {
      throw new BadRequestException("Invalid request, item and namespace do not match!");
    }

    configService.deleteItem(Env.valueOf(env), itemId, userInfoHolder.getUser().getUserId());
  }