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

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