mirror of https://github.com/apache/nifi.git
NIFI-65:
- Adding methods to the AuthorityProvider to authorize the downloading of content.
This commit is contained in:
parent
2fed138888
commit
1c72081257
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue