role-mappings.html 7.2 KB

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