mirror of https://github.com/apache/nifi.git
NIFI-3130: - Loading the temporary instance from the correct type of component.
This closes #1285. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
fff0148a0e
commit
1f40f298c0
|
@ -283,7 +283,7 @@ public class ControllerResource extends ApplicationResource {
|
||||||
lookup -> {
|
lookup -> {
|
||||||
authorizeController(RequestAction.WRITE);
|
authorizeController(RequestAction.WRITE);
|
||||||
|
|
||||||
final ConfigurableComponentAuthorizable authorizable = lookup.getProcessorByType(requestReportingTask.getType());
|
final ConfigurableComponentAuthorizable authorizable = lookup.getReportingTaskByType(requestReportingTask.getType());
|
||||||
if (authorizable.isRestricted()) {
|
if (authorizable.isRestricted()) {
|
||||||
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
|
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ public class ControllerResource extends ApplicationResource {
|
||||||
lookup -> {
|
lookup -> {
|
||||||
authorizeController(RequestAction.WRITE);
|
authorizeController(RequestAction.WRITE);
|
||||||
|
|
||||||
final ConfigurableComponentAuthorizable authorizable = lookup.getProcessorByType(requestControllerService.getType());
|
final ConfigurableComponentAuthorizable authorizable = lookup.getControllerServiceByType(requestControllerService.getType());
|
||||||
if (authorizable.isRestricted()) {
|
if (authorizable.isRestricted()) {
|
||||||
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
|
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2135,7 +2135,7 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||||
final Authorizable processGroup = lookup.getProcessGroup(groupId).getAuthorizable();
|
final Authorizable processGroup = lookup.getProcessGroup(groupId).getAuthorizable();
|
||||||
processGroup.authorize(authorizer, RequestAction.WRITE, user);
|
processGroup.authorize(authorizer, RequestAction.WRITE, user);
|
||||||
|
|
||||||
final ConfigurableComponentAuthorizable authorizable = lookup.getProcessorByType(requestControllerService.getType());
|
final ConfigurableComponentAuthorizable authorizable = lookup.getControllerServiceByType(requestControllerService.getType());
|
||||||
if (authorizable.isRestricted()) {
|
if (authorizable.isRestricted()) {
|
||||||
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, user);
|
lookup.getRestrictedComponents().authorize(authorizer, RequestAction.WRITE, user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue