Class NotHasPermissionDirective

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

    public class NotHasPermissionDirective
    extends PermissionDirective
    Directive that prints the body of the tag if the current user has no permission on entity

    usage: <@notHasPermission entity='celiacsprue' permission="WRITE">no write permission

    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • Constructor Summary

      Constructors 
      Constructor Description
      NotHasPermissionDirective​(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

      • NotHasPermissionDirective

        public NotHasPermissionDirective​(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