mirror of https://github.com/apache/nifi.git
NIFI-3706: - Removing non-existent resource when converting a legacy authorized users file.
This closes #1673. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
d08233b9fe
commit
7e1ecad738
|
@ -104,7 +104,6 @@ public final class RoleAccessPolicy {
|
||||||
final Set<RoleAccessPolicy> nifiPolicies = new HashSet<>();
|
final Set<RoleAccessPolicy> nifiPolicies = new HashSet<>();
|
||||||
nifiPolicies.add(new RoleAccessPolicy(ResourceType.Controller.getValue(), READ_ACTION));
|
nifiPolicies.add(new RoleAccessPolicy(ResourceType.Controller.getValue(), READ_ACTION));
|
||||||
nifiPolicies.add(new RoleAccessPolicy(ResourceType.SiteToSite.getValue(), READ_ACTION));
|
nifiPolicies.add(new RoleAccessPolicy(ResourceType.SiteToSite.getValue(), READ_ACTION));
|
||||||
nifiPolicies.add(new RoleAccessPolicy(ResourceType.SiteToSite.getValue(), WRITE_ACTION));
|
|
||||||
roleAccessPolicies.put(Role.ROLE_NIFI, Collections.unmodifiableSet(nifiPolicies));
|
roleAccessPolicies.put(Role.ROLE_NIFI, Collections.unmodifiableSet(nifiPolicies));
|
||||||
|
|
||||||
return roleAccessPolicies;
|
return roleAccessPolicies;
|
||||||
|
|
|
@ -355,8 +355,8 @@ public class FileAuthorizerTest {
|
||||||
assertEquals(3, user6Policies.size());
|
assertEquals(3, user6Policies.size());
|
||||||
|
|
||||||
assertTrue(user6Policies.containsKey(ResourceType.SiteToSite.getValue()));
|
assertTrue(user6Policies.containsKey(ResourceType.SiteToSite.getValue()));
|
||||||
assertEquals(2, user6Policies.get(ResourceType.SiteToSite.getValue()).size());
|
assertEquals(1, user6Policies.get(ResourceType.SiteToSite.getValue()).size());
|
||||||
assertTrue(user6Policies.get(ResourceType.SiteToSite.getValue()).contains(RequestAction.WRITE));
|
assertTrue(user6Policies.get(ResourceType.SiteToSite.getValue()).contains(RequestAction.READ));
|
||||||
|
|
||||||
final Resource inputPortResource = ResourceFactory.getDataTransferResource(
|
final Resource inputPortResource = ResourceFactory.getDataTransferResource(
|
||||||
ResourceFactory.getComponentResource(ResourceType.InputPort, "2f7d1606-b090-4be7-a592-a5b70fb55531", "TCP Input"));
|
ResourceFactory.getComponentResource(ResourceType.InputPort, "2f7d1606-b090-4be7-a592-a5b70fb55531", "TCP Input"));
|
||||||
|
|
Loading…
Reference in New Issue