[ https://issues.apache.org/jira/browse/GOBBLIN-1050?focusedWorklogId=394490&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-394490 ]
ASF GitHub Bot logged work on GOBBLIN-1050: ------------------------------------------- Author: ASF GitHub Bot Created on: 27/Feb/20 22:03 Start Date: 27/Feb/20 22:03 Worklog Time Spent: 10m Work Description: arjun4084346 commented on pull request #2890: [GOBBLIN-1050] Verify requester when updating/deleting FlowConfig URL: https://github.com/apache/incubator-gobblin/pull/2890#discussion_r385397444 ########## File path: gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsResource.java ########## @@ -124,12 +124,38 @@ public UpdateResponse update(ComplexResourceKey<FlowId, EmptyRecord> key, FlowCo */ @Override public UpdateResponse delete(ComplexResourceKey<FlowId, EmptyRecord> key) { + checkRequester(get(key), this.requesterService.findRequesters(this)); String flowGroup = key.getKey().getFlowGroup(); String flowName = key.getKey().getFlowName(); FlowId flowId = new FlowId().setFlowGroup(flowGroup).setFlowName(flowName); return this.flowConfigsResourceHandler.deleteFlowConfig(flowId, getHeaders()); } + /** + * Check that all {@link ServiceRequester}s in this request are contained within the original service requester list + * when the flow was submitted and throw a {@link FlowConfigLoggedException} if they are not. + * + * @param originalFlowConfig original flow config to find original requester + * @param requesterList list of requesters for this request + */ + public static void checkRequester(FlowConfig originalFlowConfig, List<ServiceRequester> requesterList) { Review comment: I think this method should return a boolean. Or at least javadoc needs to have information on what it throws and what that means. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 394490) Time Spent: 1h (was: 50m) > Verify requester when updating/deleting FlowConfig > -------------------------------------------------- > > Key: GOBBLIN-1050 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1050 > Project: Apache Gobblin > Issue Type: Improvement > Reporter: Jack Moseley > Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)