Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/931#discussion_r76122947
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/authorization/AuthorizeControllerServiceReference.java
---
@@ -57,8 +58,12 @@ public static void
authorizeControllerServiceReferences(final Map<String, String
if (!Objects.equals(currentValue, proposedValue)) {
// ensure access to the old service
if (currentValue != null) {
- final Authorizable currentServiceAuthorizable
= lookup.getControllerService(currentValue).getAuthorizable();
-
currentServiceAuthorizable.authorize(authorizer, RequestAction.READ, user);
+ try {
+ final Authorizable
currentServiceAuthorizable =
lookup.getControllerService(currentValue).getAuthorizable();
+
currentServiceAuthorizable.authorize(authorizer, RequestAction.READ, user);
+ } catch (ResourceNotFoundException e) {
+ // ignore if the resource is not found, if
currentValue was previously deleted, it should not stop assignment of
proposedValue
--- End diff --
fair enough
+1, merging
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---