@Test public void testDeleteAccessPolicy() throws Exception { writeFile(primaryAuthorizations, AUTHORIZATIONS); writeFile(primaryTenants, TENANTS); authorizer.onConfigured(configurationContext); assertEquals(2, authorizer.getAccessPolicies().size()); final AccessPolicy policy = new AccessPolicy.Builder() .identifier("policy-1") .resource("resource-A") .addUser("user-A") .addGroup("group-A") .action(RequestAction.READ) .build(); final AccessPolicy deletedAccessPolicy = authorizer.deleteAccessPolicy(policy); assertNotNull(deletedAccessPolicy); assertEquals(policy.getIdentifier(), deletedAccessPolicy.getIdentifier()); assertEquals(1, authorizer.getAccessPolicies().size()); assertNull(authorizer.getAccessPolicy(policy.getIdentifier())); }
@Override public synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy) throws AuthorizationAccessException { return accessPolicyProvider.deleteAccessPolicy(accessPolicy); }
FileAuthorizer extends AbstractPolicyBasedAuthorizer { @Override public synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy) throws AuthorizationAccessException { return accessPolicyProvider.deleteAccessPolicy(accessPolicy); } }
FileAuthorizer extends AbstractPolicyBasedAuthorizer { @Override public synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy) throws AuthorizationAccessException { return accessPolicyProvider.deleteAccessPolicy(accessPolicy); }  }
FileAuthorizer extends AbstractPolicyBasedAuthorizer { @Override public synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy) throws AuthorizationAccessException { return accessPolicyProvider.deleteAccessPolicy(accessPolicy); }  @Override void initialize(final AuthorizerInitializationContext initializationContext); @Override void doOnConfigured(final AuthorizerConfigurationContext configurationContext); @Override void preDestruction(); @Override synchronized Group doAddGroup(Group group); @Override Group getGroup(String identifier); @Override synchronized Group doUpdateGroup(Group group); @Override synchronized Group deleteGroup(Group group); @Override Set<Group> getGroups(); @Override synchronized User doAddUser(final User user); @Override User getUser(final String identifier); @Override User getUserByIdentity(final String identity); @Override synchronized User doUpdateUser(final User user); @Override synchronized User deleteUser(final User user); @Override Set<User> getUsers(); @Override synchronized AccessPolicy doAddAccessPolicy(final AccessPolicy accessPolicy); @Override AccessPolicy getAccessPolicy(final String identifier); @Override synchronized AccessPolicy updateAccessPolicy(final AccessPolicy accessPolicy); @Override synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy); @Override Set<AccessPolicy> getAccessPolicies(); @AuthorizerContext void setNiFiProperties(NiFiProperties properties); @Override synchronized UsersAndAccessPolicies getUsersAndAccessPolicies(); }
FileAuthorizer extends AbstractPolicyBasedAuthorizer { @Override public synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy) throws AuthorizationAccessException { return accessPolicyProvider.deleteAccessPolicy(accessPolicy); }  @Override void initialize(final AuthorizerInitializationContext initializationContext); @Override void doOnConfigured(final AuthorizerConfigurationContext configurationContext); @Override void preDestruction(); @Override synchronized Group doAddGroup(Group group); @Override Group getGroup(String identifier); @Override synchronized Group doUpdateGroup(Group group); @Override synchronized Group deleteGroup(Group group); @Override Set<Group> getGroups(); @Override synchronized User doAddUser(final User user); @Override User getUser(final String identifier); @Override User getUserByIdentity(final String identity); @Override synchronized User doUpdateUser(final User user); @Override synchronized User deleteUser(final User user); @Override Set<User> getUsers(); @Override synchronized AccessPolicy doAddAccessPolicy(final AccessPolicy accessPolicy); @Override AccessPolicy getAccessPolicy(final String identifier); @Override synchronized AccessPolicy updateAccessPolicy(final AccessPolicy accessPolicy); @Override synchronized AccessPolicy deleteAccessPolicy(final AccessPolicy accessPolicy); @Override Set<AccessPolicy> getAccessPolicies(); @AuthorizerContext void setNiFiProperties(NiFiProperties properties); @Override synchronized UsersAndAccessPolicies getUsersAndAccessPolicies();  }