user-detail.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 data-ng-hide="create">{{user.username}}</li>
  5. <li data-ng-show="create">{{:: 'add-user' | translate}}</li>
  6. </ol>
  7. <kc-tabs-user></kc-tabs-user>
  8. <form class="form-horizontal" name="userForm" novalidate kc-read-only="!create && !user.access.manage">
  9. <fieldset class="border-top">
  10. <div class="form-group">
  11. <label class="col-md-2 control-label"for="id">{{:: 'id' | translate}}</label>
  12. <div class="col-md-6">
  13. <input class="form-control" type="text" id="id" name="id" data-ng-model="user.id" autofocus data-ng-readonly="true">
  14. </div>
  15. </div>
  16. <div class="form-group">
  17. <label class="col-md-2 control-label"for="id">{{:: 'created-at' | translate}}</label>
  18. <div class="col-md-6">
  19. {{user.createdTimestamp|date:('dateFormat' | translate)}}&nbsp;{{user.createdTimestamp|date:('timeFormat' | translate)}}
  20. </div>
  21. </div>
  22. <div class="form-group" data-ng-hide="emailAsUsername">
  23. <label class="col-md-2 control-label"for="username">{{:: 'username' | translate}} <span class="required" data-ng-show="create">*</span></label>
  24. <div class="col-md-6">
  25. <!-- Characters >,<,/,\ are forbidden in username -->
  26. <input class="form-control" type="text" id="username" name="username" data-ng-model="user.username" autofocus
  27. data-ng-required="!emailAsUsername" ng-pattern="/^[^\<\>\\\/]*$/" data-ng-readonly="!editUsername">
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-md-2 control-label" for="email">{{:: 'email' | translate}}</label>
  32. <div class="col-md-6">
  33. <input class="form-control" type="email" name="email" id="email"
  34. data-ng-model="user.email">
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="col-md-2 control-label" for="firstName">{{:: 'first-name' | translate}}</label>
  39. <div class="col-md-6">
  40. <input class="form-control" type="text" name="firstName" id="firstName"
  41. data-ng-model="user.firstName">
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label class="col-md-2 control-label" for="lastName">{{:: 'last-name' | translate}}</label>
  46. <div class="col-md-6">
  47. <input class="form-control" type="text" name="lastName" id="lastName"
  48. data-ng-model="user.lastName">
  49. </div>
  50. </div>
  51. <div class="form-group clearfix block">
  52. <label class="col-md-2 control-label" for="userEnabled">{{:: 'user-enabled' | translate}}</label>
  53. <div class="col-md-6">
  54. <input ng-model="user.enabled" name="userEnabled" id="userEnabled" ng-disabled="!create && !user.access.manage" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  55. </div>
  56. <kc-tooltip>{{:: 'user-enabled.tooltip' | translate}}</kc-tooltip>
  57. </div>
  58. <div class="form-group clearfix block" data-ng-show="realm.bruteForceProtected && !create">
  59. <label class="col-md-2 control-label" for="temporarilyDisabled">{{:: 'user-temporarily-locked' | translate}}</label>
  60. <div class="col-md-1">
  61. <input ng-model="temporarilyDisabled" name="temporarilyDisabled" id="temporarilyDisabled" data-ng-readonly="true" data-ng-disabled="true" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  62. </div>
  63. <kc-tooltip>{{:: 'user-temporarily-locked.tooltip' | translate}}</kc-tooltip>
  64. <div class="col-sm-2">
  65. <button type="submit" data-ng-click="unlockUser()" data-ng-show="temporarilyDisabled" class="btn btn-default">{{:: 'unlock-user' | translate}}</button>
  66. </div>
  67. </div>
  68. <div class="form-group clearfix block" data-ng-show="!create && user.federationLink">
  69. <label class="col-md-2 control-label">{{:: 'federation-link' | translate}}</label>
  70. <div class="col-md-6">
  71. <a href="{{federationLink}}">{{federationLinkName}}</a>
  72. </div>
  73. <kc-tooltip>{{:: 'user-link.tooltip' | translate}}</kc-tooltip>
  74. </div>
  75. <div class="form-group clearfix block" data-ng-show="!create && user.origin">
  76. <label class="col-md-2 control-label">{{:: 'user-origin-link' | translate}}</label>
  77. <div class="col-md-6">
  78. <a href="{{originLink}}">{{originName}}</a>
  79. </div>
  80. <kc-tooltip>{{:: 'user-origin.tooltip' | translate}}</kc-tooltip>
  81. </div>
  82. <div class="form-group clearfix block">
  83. <label class="col-md-2 control-label" for="emailVerified">{{:: 'email-verified' | translate}}</label>
  84. <div class="col-md-6">
  85. <input ng-model="user.emailVerified" name="emailVerified" id="emailVerified" ng-disabled="!create && !user.access.manage" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
  86. </div>
  87. <kc-tooltip>{{:: 'email-verified.tooltip' | translate}}</kc-tooltip>
  88. </div>
  89. <div class="form-group clearfix block" data-ng-if="create">
  90. <label class="col-md-2 control-label" for="selected-groups">{{:: 'groups-joining' | translate}}</label>
  91. <div class="col-sm-6">
  92. <table class="table table-striped table-bordered" style="margin-top: 0px" id="selected-groups">
  93. <thead>
  94. <tr>
  95. <th class="kc-table-actions" colspan="2">
  96. <div class="form-inline col-md-12 select2-container-single">
  97. <div class="form-group">
  98. <div class="input-group">
  99. <input type="hidden" ui-select2="groupsUiSelect" id="groups" data-ng-change="selectGroup(groupSearch.selectedGroup);" data-ng-model="groupSearch.selectedGroup" data-placeholder="{{:: 'groups-joining-select.placeholder' | translate}}..."/>
  100. </div>
  101. </div>
  102. </div>
  103. </th>
  104. </tr>
  105. <tr data-ng-hide="!selectedGroups || selectedGroups.length == 0">
  106. <th>{{:: 'groups-joining-path' | translate}}</th>
  107. <th width="20%">{{:: 'actions' | translate}}</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. <tr ng-repeat="group in selectedGroups">
  112. <td>{{group.path}}</td>
  113. <td class="kc-action-cell" ng-click="removeGroup(selectedGroups, group);" style="vertical-align: middle">
  114. {{:: 'remove' | translate}}
  115. </td>
  116. </tr>
  117. <tr data-ng-show="!selectedGroups || selectedGroups.length == 0">
  118. <td class="text-muted" colspan="2">{{:: 'groups-joining-no-selected' | translate}}</td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </div>
  123. <kc-tooltip>{{:: 'groups-joining.tooltip' | translate}}</kc-tooltip>
  124. </div>
  125. <div class="form-group clearfix">
  126. <label class="col-md-2 control-label" for="reqActions">{{:: 'required-user-actions' | translate}}</label>
  127. <div class="col-md-6">
  128. <select ui-select2 id="reqActions" ng-model="user.requiredActions" data-placeholder="{{:: 'select-an-action.placeholder' | translate}}" multiple>
  129. <option ng-repeat="action in userReqActionList" value="{{action.alias}}">{{action.name}}</option>
  130. </select>
  131. </div>
  132. <kc-tooltip>{{:: 'required-user-actions.tooltip' | translate}}</kc-tooltip>
  133. </div>
  134. <div class="form-group clearfix" data-ng-if="realm.internationalizationEnabled">
  135. <label class="col-md-2 control-label" for="locale">{{:: 'locale' | translate}}</label>
  136. <div class="col-md-6">
  137. <div>
  138. <select class="form-control" id="locale"
  139. ng-model="user.attributes.locale"
  140. ng-options="o as o for o in realm.supportedLocales">
  141. <option value="" disabled selected>{{:: 'select-one.placeholder' | translate}}</option>
  142. </select>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="form-group clearfix" data-ng-hide="create || !access.impersonation || !serverInfo.featureEnabled('IMPERSONATION')">
  147. <label class="col-md-2 control-label" for="impersonate">{{:: 'impersonate-user' | translate}}</label>
  148. <div class="col-md-6">
  149. <button id="impersonate" data-ng-show="access.impersonation" kc-read-only-ignore class="btn btn-default" data-ng-click="impersonate()">{{:: 'impersonate' | translate}}</button>
  150. </div>
  151. <kc-tooltip>{{:: 'impersonate-user.tooltip' | translate}}</kc-tooltip>
  152. </div>
  153. </fieldset>
  154. <div class="form-group">
  155. <div class="col-md-10 col-md-offset-2" data-ng-show="create && (access.manageUsers || (serverInfo.featureEnabled('ADMIN_FINE_GRAINED_AUTHZ') && access.queryUsers))">
  156. <button kc-save data-ng-show="changed">{{:: 'save' | translate}}</button>
  157. <button kc-cancel data-ng-click="cancel()">{{:: 'cancel' | translate}}</button>
  158. </div>
  159. <div class="col-md-10 col-md-offset-2" data-ng-show="!create && user.access.manage">
  160. <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
  161. <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>
  162. </div>
  163. </div>
  164. </form>
  165. </div>
  166. <kc-menu></kc-menu>