class DataAuthorizable implements Authorizable, EnforcePolicyPermissionsThroughBaseResource {

    @Override
    public void authorize(Authorizer authorizer, RequestAction action, NiFiUser user, Map<String, String> resourceContext) throws AccessDeniedException {
        if (user == null) {
            throw new AccessDeniedException("Unknown user.");
        }

        // authorize each element in the chain
        NiFiUser chainedUser = user;
        do {
            try {
                // perform the current user authorization
                Authorizable.super.authorize(authorizer, action, chainedUser, resourceContext);

                // go to the next user in the chain
                chainedUser = chainedUser.getChain();
            } catch (final ResourceNotFoundException e) {
                throw new AccessDeniedException("Unknown source component.");
            }
        } while (chainedUser != null);
    }

    public  DataAuthorizable(final Authorizable authorizable);

}