applications.ftl 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <#import "template.ftl" as layout>
  2. <@layout.mainLayout active='applications' bodyClass='applications'; section>
  3. <div class="row">
  4. <div class="col-md-10">
  5. <h2>${msg("applicationsHtmlTitle")}</h2>
  6. </div>
  7. </div>
  8. <form action="${url.applicationsUrl}" method="post">
  9. <input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
  10. <input type="hidden" id="referrer" name="referrer" value="${stateChecker}">
  11. <table class="table table-striped table-bordered">
  12. <thead>
  13. <tr>
  14. <td>${msg("application")}</td>
  15. <td>${msg("availableRoles")}</td>
  16. <td>${msg("grantedPermissions")}</td>
  17. <td>${msg("additionalGrants")}</td>
  18. <td>${msg("action")}</td>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <#list applications.applications as application>
  23. <tr>
  24. <td>
  25. <#if application.effectiveUrl?has_content><a href="${application.effectiveUrl}"></#if>
  26. <#if application.client.name?has_content>${advancedMsg(application.client.name)}<#else>${application.client.clientId}</#if>
  27. <#if application.effectiveUrl?has_content></a></#if>
  28. </td>
  29. <td>
  30. <#list application.realmRolesAvailable as role>
  31. <#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)}</#if>
  32. <#if role_has_next>, </#if>
  33. </#list>
  34. <#list application.resourceRolesAvailable?keys as resource>
  35. <#if application.realmRolesAvailable?has_content>, </#if>
  36. <#list application.resourceRolesAvailable[resource] as clientRole>
  37. <#if clientRole.roleDescription??>${advancedMsg(clientRole.roleDescription)}<#else>${advancedMsg(clientRole.roleName)}</#if>
  38. ${msg("inResource")} <strong><#if clientRole.clientName??>${advancedMsg(clientRole.clientName)}<#else>${clientRole.clientId}</#if></strong>
  39. <#if clientRole_has_next>, </#if>
  40. </#list>
  41. </#list>
  42. </td>
  43. <td>
  44. <#if application.client.consentRequired>
  45. <#list application.clientScopesGranted as claim>
  46. ${advancedMsg(claim)}<#if claim_has_next>, </#if>
  47. </#list>
  48. <#else>
  49. <strong>${msg("fullAccess")}</strong>
  50. </#if>
  51. </td>
  52. <td>
  53. <#list application.additionalGrants as grant>
  54. ${advancedMsg(grant)}<#if grant_has_next>, </#if>
  55. </#list>
  56. </td>
  57. <td>
  58. <#if (application.client.consentRequired && application.clientScopesGranted?has_content) || application.additionalGrants?has_content>
  59. <button type='submit' class='${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!}' id='revoke-${application.client.clientId}' name='clientId' value="${application.client.id}">${msg("revoke")}</button>
  60. </#if>
  61. </td>
  62. </tr>
  63. </#list>
  64. </tbody>
  65. </table>
  66. </form>
  67. </@layout.mainLayout>