Class WhitelistOnlyPageFilter

  • All Implemented Interfaces:
    ComponentRequestFilter

    public class WhitelistOnlyPageFilter
    extends java.lang.Object
    implements ComponentRequestFilter
    Ensures that a component event request does not reach a page annotated with WhitelistAccessOnly from a client that is not on the whitelist. A component event request identifies two pages: the active page (from the URL path) and the containing page (from the InternalConstants.CONTAINER_PAGE_NAME request parameter), whose component actually handles the event. Code from both pages runs for the request, so both are checked here. ComponentEventLinkEncoderImpl performs the same check while decoding the request, and is the gate that normally rejects these requests. This filter repeats it independently, so that any other route to the component event pipeline is covered as well. Page render requests are passed through: they are checked while decoding, and the page render dispatcher does not honour the "component not found" attribute used here to force a 404.
    Since:
    5.9.2
    See Also:
    WhitelistAccessOnly, MetaDataConstants.WHITELIST_ONLY_PAGE