Interface FileResourceSecurityPolicy

  • All Known Subinterfaces:
    FileResourceSecurityCheckPoint

    public interface FileResourceSecurityPolicy
    This interface is mainly used for checking file/binary download requests, and it added to selected elements and objects and WM that deal with downloads. This includes downloads in the download element and other kinds of downloads such as via the Object Manager or RIS.
    Author:
    simon
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean mayView​(FileResource file, javax.servlet.http.HttpServletRequest request)
      Check whether this file may be served to the browser An element that implements this method must only return true if it can identify and verify that the requested file is permitted to be sent to the browser.
    • Method Detail

      • mayView

        boolean mayView​(FileResource file,
                        javax.servlet.http.HttpServletRequest request)
        Check whether this file may be served to the browser An element that implements this method must only return true if it can identify and verify that the requested file is permitted to be sent to the browser. This is typically done by checking that the download belongs to the element and that the element itself is on a public or authorised page.
        Parameters:
        file - The file to check.
        request - Information about this HTTP request.
        Returns:
        true if this file may be served.