Class HasPermissionDirective

  • All Implemented Interfaces:
    freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

    public class HasPermissionDirective
    extends PermissionDirective
    Directive that prints the body of the tag if the current user has Permission on entity

    usage: <@hasPermission entityTypeId='celiacsprue' permission="WRITE">write permission

    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • Constructor Summary

      Constructors 
      Constructor Description
      HasPermissionDirective​(org.molgenis.security.core.UserPermissionEvaluator permissionService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void execute​(boolean hasPermission, freemarker.core.Environment env, freemarker.template.TemplateDirectiveBody body)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HasPermissionDirective

        public HasPermissionDirective​(org.molgenis.security.core.UserPermissionEvaluator permissionService)
    • Method Detail

      • execute

        protected void execute​(boolean hasPermission,
                               freemarker.core.Environment env,
                               freemarker.template.TemplateDirectiveBody body)
                        throws freemarker.template.TemplateException,
                               java.io.IOException
        Specified by:
        execute in class PermissionDirective
        Throws:
        freemarker.template.TemplateException
        java.io.IOException