/hudson-core/src/main/resources/hudson/model/Hudson/whoAmI.jelly

http://github.com/hudson/hudson · Unknown · 74 lines · 69 code · 5 blank · 0 comment · 0 complexity · 69c04286c578f75c8dba15e902bb38e0 MD5 · raw file

  1. <!--
  2. The MIT License
  3. Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. THE SOFTWARE.
  19. -->
  20. <!-- show debug information about the current user -->
  21. <?jelly escape-by-default='true'?>
  22. <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
  23. <l:layout>
  24. <l:hasPermission permission="${app.READ}">
  25. <st:include page="sidepanel.jelly" />
  26. </l:hasPermission>
  27. <l:main-panel>
  28. <j:set var="auth" value="${app.authentication}" />
  29. <h1>Who Am I?</h1>
  30. <table>
  31. <tr>
  32. <td>Name:</td>
  33. <td>${auth.name}</td>
  34. </tr>
  35. <tr>
  36. <td>IsAuthenticated?:</td>
  37. <td>${auth.authenticated}</td>
  38. </tr>
  39. <tr>
  40. <td>Authorities:</td>
  41. <td>
  42. <ul>
  43. <j:forEach var="a" items="${auth.authorities}">
  44. <li>
  45. <j:choose>
  46. <j:when test="${a==null}">
  47. null
  48. </j:when>
  49. <j:otherwise>
  50. "${a}"
  51. </j:otherwise>
  52. </j:choose>
  53. </li>
  54. </j:forEach>
  55. </ul>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>Details:</td>
  60. <td>${auth.details}</td>
  61. </tr>
  62. <tr>
  63. <td>toString:</td>
  64. <td>${auth}</td>
  65. </tr>
  66. </table>
  67. </l:main-panel>
  68. </l:layout>
  69. </j:jelly>