authz.tld 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  3. "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
  4. <taglib>
  5. <tlib-version>1.1.2</tlib-version>
  6. <jsp-version>1.2</jsp-version>
  7. <short-name>xtframe authz</short-name>
  8. <uri>/authz-tags</uri>
  9. <description>新通框架权限控制JSP标签库</description>
  10. <tag>
  11. <name>hasPermission</name>
  12. <tag-class>com.xtframe.web.tags.HasPermissionTag</tag-class>
  13. <body-content>JSP</body-content>
  14. <description>Displays body content only if the current Subject (user)
  15. 'has' (implies) the specified permission (i.e the user has the specified ability).
  16. </description>
  17. <attribute>
  18. <name>name</name>
  19. <required>true</required>
  20. <rtexprvalue>true</rtexprvalue>
  21. </attribute>
  22. </tag>
  23. <tag>
  24. <name>lacksPermission</name>
  25. <tag-class>com.xtframe.web.tags.LacksPermissionTag</tag-class>
  26. <body-content>JSP</body-content>
  27. <description>Displays body content only if the current Subject (user) does
  28. NOT have (not imply) the specified permission (i.e. the user lacks the specified ability)
  29. </description>
  30. <attribute>
  31. <name>name</name>
  32. <required>true</required>
  33. <rtexprvalue>true</rtexprvalue>
  34. </attribute>
  35. </tag>
  36. <tag>
  37. <name>hasRole</name>
  38. <tag-class>com.xtframe.web.tags.HasRoleTag</tag-class>
  39. <body-content>JSP</body-content>
  40. <description>Displays body content only if the current user has the specified role.</description>
  41. <attribute>
  42. <name>name</name>
  43. <required>true</required>
  44. <rtexprvalue>true</rtexprvalue>
  45. </attribute>
  46. </tag>
  47. <tag>
  48. <name>hasAnyRoles</name>
  49. <tag-class>com.xtframe.web.tags.HasAnyRolesTag</tag-class>
  50. <body-content>JSP</body-content>
  51. <description>Displays body content only if the current user has one of the specified roles from a
  52. comma-separated list of role names.
  53. </description>
  54. <attribute>
  55. <name>name</name>
  56. <required>true</required>
  57. <rtexprvalue>true</rtexprvalue>
  58. </attribute>
  59. </tag>
  60. <tag>
  61. <name>lacksRole</name>
  62. <tag-class>com.xtframe.web.tags.LacksRoleTag</tag-class>
  63. <body-content>JSP</body-content>
  64. <description>Displays body content only if the current user does NOT have the specified role
  65. (i.e. they explicitly lack the specified role)
  66. </description>
  67. <attribute>
  68. <name>name</name>
  69. <required>true</required>
  70. <rtexprvalue>true</rtexprvalue>
  71. </attribute>
  72. </tag>
  73. <tag>
  74. <name>authenticated</name>
  75. <tag-class>com.xtframe.web.tags.AuthenticatedTag</tag-class>
  76. <body-content>JSP</body-content>
  77. <description>Displays body content only if the current user has successfully authenticated
  78. _during their current session_. It is more restrictive than the 'user' tag.
  79. It is logically opposite to the 'notAuthenticated' tag.
  80. </description>
  81. </tag>
  82. <tag>
  83. <name>notAuthenticated</name>
  84. <tag-class>com.xtframe.web.tags.NotAuthenticatedTag</tag-class>
  85. <body-content>JSP</body-content>
  86. <description>Displays body content only if the current user has NOT succesfully authenticated
  87. _during their current session_. It is logically opposite to the 'authenticated' tag.
  88. </description>
  89. </tag>
  90. <tag>
  91. <name>user</name>
  92. <tag-class>com.xtframe.web.tags.UserTag</tag-class>
  93. <body-content>JSP</body-content>
  94. <description>Displays body content only if the current Subject has a known identity, either
  95. from a previous login or from 'RememberMe' services. Note that this is semantically different
  96. from the 'authenticated' tag, which is more restrictive. It is logically
  97. opposite to the 'guest' tag.
  98. </description>
  99. </tag>
  100. <tag>
  101. <name>guest</name>
  102. <tag-class>com.xtframe.web.tags.GuestTag</tag-class>
  103. <body-content>JSP</body-content>
  104. <description>Displays body content only if the current Subject IS NOT known to the system, either
  105. because they have not logged in or they have no corresponding 'RememberMe' identity. It is logically
  106. opposite to the 'user' tag.
  107. </description>
  108. </tag>
  109. <tag>
  110. <name>principal</name>
  111. <tag-class>com.xtframe.web.tags.PrincipalTag</tag-class>
  112. <body-content>JSP</body-content>
  113. <description>Displays the user's principal or a property of the user's principal.</description>
  114. <attribute>
  115. <name>type</name>
  116. <required>false</required>
  117. <rtexprvalue>true</rtexprvalue>
  118. </attribute>
  119. <attribute>
  120. <name>property</name>
  121. <required>false</required>
  122. <rtexprvalue>true</rtexprvalue>
  123. </attribute>
  124. <attribute>
  125. <name>defaultValue</name>
  126. <required>false</required>
  127. <rtexprvalue>true</rtexprvalue>
  128. </attribute>
  129. </tag>
  130. </taglib>