Class CmsUgcSessionSecurityUtil

java.lang.Object
org.opencms.ugc.CmsUgcSessionSecurityUtil

public class CmsUgcSessionSecurityUtil extends Object
Helper class which implements some of the security checks for user generated content creation.

  • Method Details

    • checkCreateContent

      public static void checkCreateContent(CmsObject cms, CmsUgcConfiguration config) throws CmsUgcException
      Checks whether a new XML content may be created and throws an exception if this is not the case.

      Parameters:
      cms - the current CMS context
      config - the form configuration
      Throws:
      CmsUgcException - if something goes wrong
    • checkCreateUpload

      public static void checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, String name, long size) throws CmsUgcException
      Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.
      Parameters:
      cms - the current CMS context
      config - the form configuration
      name - the file name of the uploaded file
      size - the size of the uploaded file
      Throws:
      CmsUgcException - if something goes wrong