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

    • 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,
                               IOException
        Specified by:
        execute in class PermissionDirective
        Throws:
        freemarker.template.TemplateException
        IOException