shiros.tld 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing,
  14. ~ software distributed under the License is distributed on an
  15. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. ~ KIND, either express or implied. See the License for the
  17. ~ specific language governing permissions and limitations
  18. ~ under the License.
  19. -->
  20. <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
  21. "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
  22. <taglib>
  23. <tlib-version>1.1.2</tlib-version>
  24. <jsp-version>1.2</jsp-version>
  25. <short-name>Apache Shiro</short-name>
  26. <uri>http://shiro.apache.org/tagss</uri>
  27. <description>Apache Shiro JSP Tag Library extends the hasAnyPermissions tag.</description>
  28. <tag>
  29. <name>hasPermission</name>
  30. <tag-class>org.apache.shiro.web.tags.HasPermissionTag</tag-class>
  31. <body-content>JSP</body-content>
  32. <description>Displays body content only if the current Subject (user)
  33. 'has' (implies) the specified permission (i.e the user has the specified ability).
  34. </description>
  35. <attribute>
  36. <name>name</name>
  37. <required>true</required>
  38. <rtexprvalue>true</rtexprvalue>
  39. </attribute>
  40. </tag>
  41. <tag>
  42. <name>hasAnyPermissions</name>
  43. <tag-class>com.thinkgem.jeesite.common.security.shiro.HasAnyPermissionsTag</tag-class>
  44. <body-content>JSP</body-content>
  45. <description>Displays body content only if the current user has one of the specified permissions from a
  46. comma-separated list of permission names.
  47. </description>
  48. <attribute>
  49. <name>name</name>
  50. <required>true</required>
  51. <rtexprvalue>true</rtexprvalue>
  52. </attribute>
  53. </tag>
  54. <tag>
  55. <name>lacksPermission</name>
  56. <tag-class>org.apache.shiro.web.tags.LacksPermissionTag</tag-class>
  57. <body-content>JSP</body-content>
  58. <description>Displays body content only if the current Subject (user) does
  59. NOT have (not imply) the specified permission (i.e. the user lacks the specified ability)
  60. </description>
  61. <attribute>
  62. <name>name</name>
  63. <required>true</required>
  64. <rtexprvalue>true</rtexprvalue>
  65. </attribute>
  66. </tag>
  67. <tag>
  68. <name>hasRole</name>
  69. <tag-class>org.apache.shiro.web.tags.HasRoleTag</tag-class>
  70. <body-content>JSP</body-content>
  71. <description>Displays body content only if the current user has the specified role.</description>
  72. <attribute>
  73. <name>name</name>
  74. <required>true</required>
  75. <rtexprvalue>true</rtexprvalue>
  76. </attribute>
  77. </tag>
  78. <tag>
  79. <name>hasAnyRoles</name>
  80. <tag-class>org.apache.shiro.web.tags.HasAnyRolesTag</tag-class>
  81. <body-content>JSP</body-content>
  82. <description>Displays body content only if the current user has one of the specified roles from a
  83. comma-separated list of role names.
  84. </description>
  85. <attribute>
  86. <name>name</name>
  87. <required>true</required>
  88. <rtexprvalue>true</rtexprvalue>
  89. </attribute>
  90. </tag>
  91. <tag>
  92. <name>lacksRole</name>
  93. <tag-class>org.apache.shiro.web.tags.LacksRoleTag</tag-class>
  94. <body-content>JSP</body-content>
  95. <description>Displays body content only if the current user does NOT have the specified role
  96. (i.e. they explicitly lack the specified role)
  97. </description>
  98. <attribute>
  99. <name>name</name>
  100. <required>true</required>
  101. <rtexprvalue>true</rtexprvalue>
  102. </attribute>
  103. </tag>
  104. <tag>
  105. <name>authenticated</name>
  106. <tag-class>org.apache.shiro.web.tags.AuthenticatedTag</tag-class>
  107. <body-content>JSP</body-content>
  108. <description>Displays body content only if the current user has successfully authenticated
  109. _during their current session_. It is more restrictive than the 'user' tag.
  110. It is logically opposite to the 'notAuthenticated' tag.
  111. </description>
  112. </tag>
  113. <tag>
  114. <name>notAuthenticated</name>
  115. <tag-class>org.apache.shiro.web.tags.NotAuthenticatedTag</tag-class>
  116. <body-content>JSP</body-content>
  117. <description>Displays body content only if the current user has NOT succesfully authenticated
  118. _during their current session_. It is logically opposite to the 'authenticated' tag.
  119. </description>
  120. </tag>
  121. <tag>
  122. <name>user</name>
  123. <tag-class>org.apache.shiro.web.tags.UserTag</tag-class>
  124. <body-content>JSP</body-content>
  125. <description>Displays body content only if the current Subject has a known identity, either
  126. from a previous login or from 'RememberMe' services. Note that this is semantically different
  127. from the 'authenticated' tag, which is more restrictive. It is logically
  128. opposite to the 'guest' tag.
  129. </description>
  130. </tag>
  131. <tag>
  132. <name>guest</name>
  133. <tag-class>org.apache.shiro.web.tags.GuestTag</tag-class>
  134. <body-content>JSP</body-content>
  135. <description>Displays body content only if the current Subject IS NOT known to the system, either
  136. because they have not logged in or they have no corresponding 'RememberMe' identity. It is logically
  137. opposite to the 'user' tag.
  138. </description>
  139. </tag>
  140. <tag>
  141. <name>principal</name>
  142. <tag-class>org.apache.shiro.web.tags.PrincipalTag</tag-class>
  143. <body-content>JSP</body-content>
  144. <description>Displays the user's principal or a property of the user's principal.</description>
  145. <attribute>
  146. <name>type</name>
  147. <required>false</required>
  148. <rtexprvalue>true</rtexprvalue>
  149. </attribute>
  150. <attribute>
  151. <name>property</name>
  152. <required>false</required>
  153. <rtexprvalue>true</rtexprvalue>
  154. </attribute>
  155. <attribute>
  156. <name>defaultValue</name>
  157. <required>false</required>
  158. <rtexprvalue>true</rtexprvalue>
  159. </attribute>
  160. </tag>
  161. </taglib>