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
418d6b03b2
commit
e1ffbdf466
|
@ -21,6 +21,8 @@ import java.io.IOException;
|
|||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
|
@ -492,6 +494,20 @@ public class FileAuthorizationProvider implements AuthorityProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grants access to download content regardless of FlowFile attributes.
|
||||
*
|
||||
* @param dnChain
|
||||
* @param attributes
|
||||
* @return
|
||||
* @throws UnknownIdentityException
|
||||
* @throws AuthorityAccessException
|
||||
*/
|
||||
@Override
|
||||
public DownloadAuthorization authorizeDownload(List<String> dnChain, Map<String, String> attributes) throws UnknownIdentityException, AuthorityAccessException {
|
||||
return DownloadAuthorization.approved();
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates the user with the specified DN.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue