[ 
https://issues.apache.org/jira/browse/KNOX-2848?focusedWorklogId=831036&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-831036
 ]

ASF GitHub Bot logged work on KNOX-2848:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Dec/22 14:23
            Start Date: 05/Dec/22 14:23
    Worklog Time Spent: 10m 
      Work Description: 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.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 831036)
    Time Spent: 0.5h  (was: 20m)

> Prevent  overwriting generated descriptors/providers
> ----------------------------------------------------
>
>                 Key: KNOX-2848
>                 URL: https://issues.apache.org/jira/browse/KNOX-2848
>             Project: Apache Knox
>          Issue Type: Sub-task
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> One can overwrite a generated descriptor or provider using the admin UI.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to