- Adding methods to the AuthorityProvider to authorize the downloading of content.
This commit is contained in:
Matt Gilman 2014-12-23 09:33:17 -05:00
parent 2fed138888
commit 1c72081257
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package org.apache.nifi.integration.util;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.nifi.authorization.Authority;
@ -29,6 +30,7 @@ import org.apache.nifi.authorization.exception.AuthorityAccessException;
import org.apache.nifi.authorization.exception.ProviderCreationException;
import org.apache.nifi.authorization.exception.UnknownIdentityException;
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.authorization.DownloadAuthorization;
/**
*
@ -169,4 +171,9 @@ public class NiFiTestAuthorizationProvider implements AuthorityProvider {
public void ungroup(String group) throws UnknownIdentityException, AuthorityAccessException {
}
@Override
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
return DownloadAuthorization.approved();
}
}