client-service-account-roles.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <ol class="breadcrumb">
  3. <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li>
  4. <li>{{client.clientId}}</li>
  5. </ol>
  6. <kc-tabs-client></kc-tabs-client>
  7. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!client.access.configure" data-ng-show="client.serviceAccountsEnabled">
  8. <h2>{{:: 'service-account' | translate}}</h2>
  9. <div class="form-group">
  10. <label class="col-md-2 control-label">{{:: 'service-account.user' | translate}}</label>
  11. <div class="col-md-6">
  12. <a class="form-control" ng-href="#/realms/{{realm.realm}}/users/{{user.id}}">{{user.username}}</a>
  13. </div>
  14. <kc-tooltip>{{:: 'service-account.user.tooltip' | translate}}</kc-tooltip>
  15. </div>
  16. <p class="subtitle"></p>
  17. <h2>{{:: 'service-account.roles' | translate}}</h2>
  18. <p class="subtitle"></p>
  19. <div class="form-group">
  20. <label class="col-md-2 control-label" class="control-label">{{:: 'realm-roles' | translate}}</label>
  21. <div class="col-md-10">
  22. <div class="row">
  23. <div class="col-md-3">
  24. <label class="control-label" for="available">{{:: 'available-roles' | translate}}</label>
  25. <kc-tooltip>{{:: 'service-account.available-roles.tooltip' | translate}}</kc-tooltip>
  26. <select id="available" class="form-control overflow-select" multiple size="5"
  27. ng-multiple="true"
  28. ng-model="selectedRealmRoles">
  29. <option ng-repeat="r in realmRoles | orderBy:'name'"
  30. value="{{r}}" title="{{r.name}}">
  31. {{r.name}}
  32. </option>
  33. </select>
  34. <button ng-disabled="selectedRealmRoles.length == 0" class="btn btn-default" type="submit" ng-click="addRealmRole()">
  35. {{:: 'add-selected' | translate}} <i class="fa fa-angle-double-right"></i>
  36. </button>
  37. </div>
  38. <div class="col-md-3">
  39. <label class="control-label" for="assigned">{{:: 'assigned-roles' | translate}}</label>
  40. <kc-tooltip>{{:: 'service-account.assigned-roles.tooltip' | translate}}</kc-tooltip>
  41. <select id="assigned" class="form-control overflow-select" multiple size=5
  42. ng-multiple="true"
  43. ng-model="selectedRealmMappings">
  44. <option ng-repeat="r in realmMappings | orderBy:'name'"
  45. value="{{r}}" title="{{r.name}}">
  46. {{r.name}}
  47. </option>
  48. </select>
  49. <button ng-disabled="selectedRealmMappings.length == 0" class="btn btn-default" type="submit" ng-click="deleteRealmRole()">
  50. <i class="fa fa-angle-double-left"></i> {{:: 'remove-selected' | translate}}
  51. </button>
  52. </div>
  53. <div class="col-md-3">
  54. <label class="control-label" for="realm-composite">{{:: 'effective-roles' | translate}} </label>
  55. <kc-tooltip>{{:: 'realm.effective-roles.tooltip' | translate}}</kc-tooltip>
  56. <select id="realm-composite" class="form-control overflow-select" multiple size=5
  57. disabled="true"
  58. ng-model="dummymodel">
  59. <option ng-repeat="r in realmComposite | orderBy:'name'"
  60. value="{{r}}" title="{{r.name}}">
  61. {{r.name}}
  62. </option>
  63. </select>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label class="col-md-2 control-label" for="clients">{{:: 'client-roles' | translate}}</label>
  70. <div class="col-md-6">
  71. <input type="hidden" ui-select2="clientsUiSelect" id="clients" data-ng-model="selectedClient" data-ng-change="changeClient(selectedClient);" data-placeholder="{{:: 'authz-select-client' | translate}}...">
  72. </input>
  73. </div>
  74. <div class="col-md-10 col-md-push-2">
  75. <div class="row" data-ng-show="selectedClient">
  76. <div class="col-md-3">
  77. <label class="control-label" for="available-client">{{:: 'available-roles' | translate}}</label>
  78. <kc-tooltip>{{:: 'assign.available-roles.tooltip' | translate}}</kc-tooltip>
  79. <select id="available-client" class="form-control overflow-select" multiple size="5"
  80. ng-multiple="true"
  81. ng-model="selectedClientRoles">
  82. <option ng-repeat="r in clientRoles | orderBy:'name'"
  83. value="{{r}}" title="{{r.name}}">
  84. {{r.name}}
  85. </option>
  86. </select>
  87. <button ng-disabled="selectedClientRoles.length == 0" class="btn btn-default" type="submit" ng-click="addClientRole()">
  88. {{:: 'add-selected' | translate}} <i class="fa fa-angle-double-right"></i>
  89. </button>
  90. </div>
  91. <div class="col-md-3">
  92. <label class="control-label" for="assigned-client">{{:: 'assigned-roles' | translate}}</label>
  93. <kc-tooltip>{{:: 'client.assigned-roles.tooltip' | translate}}</kc-tooltip>
  94. <select id="assigned-client" class="form-control overflow-select" multiple size=5
  95. ng-multiple="true"
  96. ng-model="selectedClientMappings">
  97. <option ng-repeat="r in clientMappings | orderBy:'name'"
  98. value="{{r}}" title="{{r.name}}">
  99. {{r.name}}
  100. </option>
  101. </select>
  102. <button ng-disabled="selectedClientMappings.length == 0" class="btn btn-default" type="submit" ng-click="deleteClientRole()">
  103. <i class="fa fa-angle-double-left"></i> {{:: 'remove-selected' | translate}}
  104. </button>
  105. </div>
  106. <div class="col-md-3">
  107. <label class="control-label" for="client-composite">{{:: 'effective-roles' | translate}}</label>
  108. <kc-tooltip>{{:: 'client.effective-roles.tooltip' | translate}}</kc-tooltip>
  109. <select id="client-composite" class="form-control overflow-select" multiple size=5
  110. disabled="true"
  111. ng-model="dummymodel">
  112. <option ng-repeat="r in clientComposite | orderBy:'name'"
  113. value="{{r}}" title="{{r.name}}">
  114. {{r.name}}
  115. </option>
  116. </select>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </form>
  122. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!client.access.configure" data-ng-show="!client.serviceAccountsEnabled">
  123. <legend><span class="text" translate="service-account-is-not-enabled-for" translate-values="{client: client.clientId}"></span></legend>
  124. </form>
  125. </div>
  126. <kc-menu></kc-menu>