user-credentials.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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="userForm" novalidate>
  8. <fieldset class="border-top" data-ng-show="user.federationLink || user.origin">
  9. <legend>
  10. <span class="text">{{:: 'supported-user-storage-credential-types' | translate}}</span>
  11. <kc-tooltip>{{:: 'supported-user-storage-credential-types.tooltip' | translate}}</kc-tooltip>
  12. </legend>
  13. <table class="datatable table table-bordered dataTable no-footer credentials-table">
  14. <thead>
  15. <tr>
  16. <th>{{:: 'type' | translate}}</th>
  17. <th>{{:: 'provided-by' | translate}}</th>
  18. </tr>
  19. </thead>
  20. <tr ng-repeat="credential in userStorageCredentialTypes">
  21. <td>
  22. <b>{{credential}}</b>
  23. </td>
  24. <td>
  25. <a href="{{getUserStorageProviderLink()}}">{{getUserStorageProviderName()}}</a>
  26. </td>
  27. </tr>
  28. </table>
  29. </fieldset>
  30. <fieldset class="border-top">
  31. <legend data-ng-show="user.federationLink || user.origin">
  32. <span class="text">{{:: 'manage-credentials' | translate}}</span>
  33. <kc-tooltip>{{:: 'manage-credentials.tooltip' | translate}}</kc-tooltip>
  34. </legend>
  35. <legend data-ng-hide="user.federationLink || user.origin">
  36. <span class="text">{{:: 'manage-credentials' | translate}}</span>
  37. </legend>
  38. <table class="datatable table table-bordered dataTable no-footer credentials-table">
  39. <thead>
  40. <tr>
  41. <th>{{:: 'position' | translate}}</th>
  42. <th>{{:: 'type' | translate}}</th>
  43. <th>{{:: 'user-label' | translate}}</th>
  44. <th>{{:: 'data' | translate}}</th>
  45. <th colspan="2">{{:: 'actions' | translate}}</th>
  46. </tr>
  47. </thead>
  48. <tr ng-repeat="credential in credentials">
  49. <td class="credential-arrows-cell">
  50. <button data-ng-disabled="$first" class="btn btn-default btn-sm" data-ng-click="moveUp(credentials, $index)"><i class="fa fa-angle-up"></i></button>
  51. <button data-ng-disabled="$last" class="btn btn-default btn-sm" data-ng-click="moveDown(credentials, $index)"><i class="fa fa-angle-down"></i></button>
  52. </td>
  53. <td>
  54. <b>{{credential.type}}</b>
  55. </td>
  56. <td class="credential-label-cell">
  57. <input type="text" class="form-control" data-ng-model="credential.userLabel"/>
  58. </td>
  59. <td class="credential-action-cell">
  60. <div class="kc-action-cell" data-ng-click="showData(credential.credentialData)">
  61. {{:: 'show-data' | translate}}
  62. </div>
  63. </td>
  64. <td class="credential-action-cell">
  65. <div class="kc-action-cell" data-ng-click="deleteCredential(credential)">
  66. {{:: 'delete' | translate}}
  67. </div>
  68. </td>
  69. <td class="credential-action-cell">
  70. <div class="kc-action-cell" data-ng-click="updateCredentialLabel(credential)">
  71. {{:: 'save' | translate}}
  72. </div>
  73. </td>
  74. </tr>
  75. </table>
  76. </fieldset>
  77. <fieldset class="border-top">
  78. <legend><span class="text">{{ (hasPassword ? 'reset-password' : 'set-password') | translate }}</span></legend>
  79. <div class="form-group">
  80. <label class="col-md-2 control-label" for="newPas">{{:: 'password' | translate}} <span class="required" data-ng-show="create">*</span></label>
  81. <div class="col-md-6">
  82. <input class="form-control" kc-password type="text" id="newPas" name="newPas" data-ng-model="password" required>
  83. </div>
  84. </div>
  85. <div class="form-group">
  86. <label class="col-md-2 control-label" for="confirmPas">{{:: 'password-confirmation' | translate}} <span class="required" data-ng-show="create">*</span></label>
  87. <div class="col-md-6">
  88. <input class="form-control" kc-password id="confirmPas" name="confirmPas" data-ng-model="confirmPassword" required>
  89. </div>
  90. </div>
  91. <div class="form-group clearfix block">
  92. <label class="col-md-2 control-label" for="temporaryPassword">{{:: 'temporary' | translate}}</label>
  93. <div class="col-md-6">
  94. <input ng-model="temporaryPassword" name="temporaryPassword" id="temporaryPassword" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />
  95. </div>
  96. <kc-tooltip>{{:: 'credentials.temporary.tooltip' | translate}}</kc-tooltip>
  97. </div>
  98. <div class="form-group">
  99. <div class="col-md-10 col-md-offset-2">
  100. <button data-ng-disabled="!passwordAndConfirmPasswordEntered()" class="btn btn-default" type="submit" data-ng-click="resetPassword(true)">{{ (hasPassword ? 'reset-password' : 'set-password') | translate }}</button>
  101. </div>
  102. </div>
  103. </fieldset>
  104. <fieldset class="border-top" data-ng-show="user.disableableCredentialTypes && user.disableableCredentialTypes.length > 0">
  105. <legend><span class="text">{{:: 'disable-credentials' | translate}}</span></legend>
  106. <div class="form-group clearfix">
  107. <label class="col-md-2 control-label" for="credentialTypeList">{{:: 'disableable-credential-types' | translate}}</label>
  108. <div class="col-md-6">
  109. <select ui-select2 id="credentialTypeList" ng-model="disableableCredentialTypes" data-placeholder="{{:: 'select-a-type.placeholder' | translate}}" multiple>
  110. <option ng-repeat="credType in user.disableableCredentialTypes" value="{{credType}}">{{credType}}</option>
  111. </select>
  112. </div>
  113. <kc-tooltip>{{:: 'credentials.disableable.tooltip' | translate}}</kc-tooltip>
  114. </div>
  115. <div class="form-group clearfix">
  116. <label class="col-md-2 control-label" for="disableCredentialTypes">{{:: 'disable-credential-types' | translate}}</label>
  117. <div class="col-md-6">
  118. <button data-ng-disabled="disableableCredentialTypes.length === 0" type="button" id="disableCredentialTypes" class="btn btn-default" data-ng-click="disableCredentialTypes()">{{:: 'disable' | translate}}</button>
  119. </div>
  120. <kc-tooltip>{{:: 'credentials.disable.tooltip' | translate}}</kc-tooltip>
  121. </div>
  122. </fieldset>
  123. <fieldset class="border-top" data-ng-show="user.email">
  124. <legend><span class="text">{{:: 'credential-reset-actions' | translate}}</span></legend>
  125. <div class="form-group clearfix">
  126. <label class="col-md-2 control-label" for="reqActions">{{:: 'reset-actions' | translate}}</label>
  127. <div class="col-md-6">
  128. <select ui-select2 id="reqActions" ng-model="emailActions" data-placeholder="{{:: 'select-an-action.placeholder' | translate}}" multiple>
  129. <option ng-repeat="action in userReqActionList" value="{{action.alias}}">{{action.name}} ({{action.alias}})</option>
  130. </select>
  131. </div>
  132. <kc-tooltip>{{:: 'credentials.reset-actions.tooltip' | translate}}</kc-tooltip>
  133. </div>
  134. <div class="form-group clearfix">
  135. <label class="col-md-2 control-label" for="reqActionsEmailTimeout">{{:: 'credential-reset-actions-timeout' | translate}}</label>
  136. <div class="col-md-6 time-selector">
  137. <input class="form-control" type="number" required min="1" max="31536000" data-ng-model="emailActionsTimeout.time"
  138. id="reqActionsEmailTimeout" name="reqActionsEmailTimeout">
  139. <select class="form-control" name="reqActionsEmailTimeoutUnit" data-ng-model="emailActionsTimeout.unit">
  140. <option value="Minutes">{{:: 'minutes' | translate}}</option>
  141. <option value="Hours">{{:: 'hours' | translate}}</option>
  142. <option value="Days">{{:: 'days' | translate}}</option>
  143. </select>
  144. </div>
  145. <kc-tooltip>{{:: 'credential-reset-actions-timeout.tooltip' | translate}}</kc-tooltip>
  146. </div>
  147. <div class="form-group clearfix">
  148. <label class="col-md-2 control-label" for="reqActionsEmail">{{:: 'reset-actions-email' | translate}}</label>
  149. <div class="col-md-6">
  150. <button data-ng-disabled="emailActions.length === 0" type="button" id="reqActionsEmail" class="btn btn-default" data-ng-click="sendExecuteActionsEmail()">{{:: 'send-email' | translate}}</button>
  151. </div>
  152. <kc-tooltip>{{:: 'credentials.reset-actions-email.tooltip' | translate}}</kc-tooltip>
  153. </div>
  154. </fieldset>
  155. </form>
  156. </div>
  157. <kc-menu></kc-menu>