Will-Lo commented on a change in pull request #3142:
URL: https://github.com/apache/incubator-gobblin/pull/3142#discussion_r514471093
##########
File path:
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsV2Resource.java
##########
@@ -200,4 +210,29 @@ private Properties getHeaders() {
}
return headerProperties;
}
+
+ public void checkRequester(
+ RequesterService requesterService, FlowConfig originalFlowConfig,
List<ServiceRequester> requesterList) {
+ if (requesterList == null) {
+ return;
+ }
+
+ try {
+ String serializedOriginalRequesterList =
originalFlowConfig.getProperties().get(RequesterService.REQUESTER_LIST);
+ if (serializedOriginalRequesterList != null) {
+ List<ServiceRequester> originalRequesterList =
RequesterService.deserialize(serializedOriginalRequesterList);
+ String owningGroup =
originalFlowConfig.getProperties().getOrDefault("owning_group", "");
+ // check that the requester is part of the owning group
+ if (!owningGroup.isEmpty()) {
Review comment:
I like the idea of an admin mode! Would the admin mode just be another
flow configuration parameter? How would we authenticate that?
----------------------------------------------------------------
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:
[email protected]