Package org.alfresco.repo.template
Class HasPermissionMethod
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.template.BaseTemplateProcessorExtension
org.alfresco.repo.template.HasPermissionMethod
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel,org.alfresco.processor.ProcessorExtension,TemplateProcessorExtension
public class HasPermissionMethod
extends BaseTemplateProcessorExtension
implements freemarker.template.TemplateMethodModelEx
- Author:
- Kevin Roast
Custom FreeMarker Template language method.
Method returns whether the current user is granted a particular permission a the TemplateNode.
Usage: hasPermission(TemplateNode node, String permission) - 1 on true, 0 on false
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.alfresco.repo.template.BaseTemplateProcessorExtension
getTemplateImageResolver, setTemplateImageResolverMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.processor.ProcessorExtension
getExtensionName
-
Constructor Details
-
HasPermissionMethod
public HasPermissionMethod()
-
-
Method Details
-
exec
- Specified by:
execin interfacefreemarker.template.TemplateMethodModel- Specified by:
execin interfacefreemarker.template.TemplateMethodModelEx- Throws:
freemarker.template.TemplateModelException- See Also:
-
TemplateMethodModel.exec(java.util.List)
-