Package org.opencms.ugc
Class CmsUgcSessionSecurityUtil
- java.lang.Object
-
- org.opencms.ugc.CmsUgcSessionSecurityUtil
-
public class CmsUgcSessionSecurityUtil extends java.lang.Object
Helper class which implements some of the security checks for user generated content creation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkCreateContent(CmsObject cms, CmsUgcConfiguration config)
Checks whether a new XML content may be created and throws an exception if this is not the case.static void
checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, java.lang.String name, long size)
Checks whether an uploaded file can be created in the VFS, and throws an exception otherwise.
-
-
-
Method Detail
-
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 contextconfig
- the form configuration- Throws:
CmsUgcException
- if something goes wrong
-
checkCreateUpload
public static void checkCreateUpload(CmsObject cms, CmsUgcConfiguration config, java.lang.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 contextconfig
- the form configurationname
- the file name of the uploaded filesize
- the size of the uploaded file- Throws:
CmsUgcException
- if something goes wrong
-
-