(Quick Reference)

permitted

Purpose

Renders the body if the user is granted the specified permission(s)

Examples

Single String:

<sec:permitted className='com.foo.Report' id='${reportId}' permission='read'>

the body content

</sec:permitted>

Multiple String:

<sec:permitted className='com.foo.Report' id='${reportId}' permission='write,read'>

the body content

</sec:permitted>

Single Permission:

<%@ page import="org.springframework.security.acls.domain.BasePermission" %>

<sec:permitted className='com.foo.Report' id='${reportId}' permission='${BasePermission.READ}'>

the body content

</sec:permitted>

List of Permission:

<%@ page import="org.springframework.security.acls.domain.BasePermission" %>

<sec:permitted className='com.foo.Report' id='${reportId}' permission='${[BasePermission.WRITE,BasePermission.READ]}'>

the body content

</sec:permitted>

Single mask int:

<sec:permitted className='com.foo.Report' id='${reportId}' permission='${1}'>

the body content

</sec:permitted>

Multiple mask int:

<sec:permitted className='com.foo.Report' id='${reportId}' permission='2,1'>

the body content

</sec:permitted>

Description

Renders the body if the user has grants for the specified permissions. Permissions are specified in the 'permission' attribute and can be a single Permission, an array of Permission, an int/Integer (which is assumed to be a mask), a String (which can be a single name, or a comma-delimited list of names, or a comma-delimited list of masks), or a List of any of these.