You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2022/12/05 14:23:16 UTC
[GitHub] [knox] zeroflag commented on a diff in pull request #687: KNOX-2848: Prevent overwriting generated descriptors/providers
zeroflag commented on code in PR #687:
URL: https://github.com/apache/knox/pull/687#discussion_r1039663874
##########
gateway-service-admin/src/main/java/org/apache/knox/gateway/service/admin/TopologiesResource.java:
##########
@@ -424,6 +429,14 @@ public Response uploadSimpleDescriptor(@PathParam("name") String name,
return response;
}
+ private boolean existingGeneratedTopology(String fileName, TopologyService topologyService, GatewayConfig config) {
+ for (org.apache.knox.gateway.topology.Topology topology : topologyService.getTopologies()) {
Review Comment:
We check if the topology is included in `config.getReadOnlyOverrideTopologyNames()`. There is an `isGenerated` flag in the topology as well, but at this point of the code, it is not yet populated. Therefore I check directly based on the config property.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org