Authentication and Access control tags supplied by Nimble


Current Tags

hasAllRoles

This tag only writes its body to the output if the current user has all the given roles.
Attributes
  • in - A list of role names
Usage: <n:hasAllRoles in="['sysadmin', 'programmer']"> ... </n:hasAllRoles>

hasAnyRole

This tag only writes its body to the output if the current user has any of the given roles.
Attributes
  • in - A list of role names\
Usage: <n:hasAnyRole in="['sysadmin', 'programmer']"> ... </n:hasAnyRole>

hasRole 

This tag only writes its body to the output if the current user has the given role.
Attributes
  • name - The name of the role
Usage: <n:hasRole name="programmer"> ... </n:hasRole>

hasPermission

This tag only writes its body to the output if the current user has the given permission.
Attributes
  • target - The string representation of the permission required in multiple levels format
Usage: <n:hasPermission target="programmer"> ... </n:hasPermission>

isLoggedIn

This tag only writes its body to the output if the current user is logged in.
Usage: <n:isLoggedIn> ... </n:isLoggedIn>

isAdministrator

This tag only writes its body to the output if the current user is an administrator.
Usage: <n:isAdministrator> ... </n:isAdministrator>

isNotLoggedIn

This tag only writes its body to the output if the current user is not logged in.
Usage: <n:isNotLoggedIn> ... </n:isNotLoggedIn>

lacksAllRoles 

This tag only writes its body to the output if the current user doesn't have all of the given roles.
Attributes
  • in - A list of role names
Usage: <n:lacksAllRoles in="['sysadmin', 'programmer']"> ... </n:lacksAllRoles>

lacksAnyRole

This tag only writes its body to the output if the current user has none of the given roles.
Attributes
  • in - A list of role names
Usage: <n:lacksAnyRole in="['sysadmin', 'programmer']"> ... </n:lacksAnyRole>

lacksRole

This tag only writes its body to the output if the current user does not have the given role.
Attributes
  • name - The name of the role
Usage: <n:lacksRole name="programmer"> ... </n:lacksRole>

lacksPermission

This tag only writes its body to the output if the current user does not have the given permission.
Attributes
  • target - The string representation of the permission required in multiple levels format
Usage: <n:lacksPermission target="books:edit"> ... </n:lacksPermission>

notRemembered 

This tag only writes its body to the output if the current user is not remembered from a previous session (via the "remember me" cookie).
Usage: <n:notRemembered> .... </n:notRemembered>

notUser

This tag only writes its body to the output if the current user is neither logged in nor remembered from a previous session (via the "remember me" cookie).
Usage: <n:notUser> .... </n:notUser>

principal

Provides markup that renders the username of the logged in user
Usage: <n:principal />

principalLink

Provides markup that renders a link to the administrative view of the logged in principal
Usage: <n:principalLink> ... </n:principalLink>

principalName

Provides markup that renders the name of the logged in user
Usage: <n:principalName />

remembered

This tag only writes its body to the output if the current user is remembered from a previous session (via the "remember me" cookie) but not currently logged in.
Usage: <n:remembered> .... </n:remembered>

user

This tag only writes its body to the output if the current user is either logged in or remembered from a previous session (via the "remember me" cookie).
Usage: <n:user> .... </n:user>
Comments