client-reg-policies.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!--
  2. ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  3. ~ and other contributors as indicated by the @author tags.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  18. <kc-tabs-realm></kc-tabs-realm>
  19. <ul class="nav nav-tabs nav-tabs-pf">
  20. <li><a href="#/realms/{{realm.realm}}/client-registration/client-initial-access">{{:: 'initial-access-tokens' | translate}}</a></li>
  21. <li class="active"><a href="#/realms/{{realm.realm}}/client-registration/client-reg-policies">{{:: 'client-reg-policies' | translate}}</a></li>
  22. </ul>
  23. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
  24. <fieldset>
  25. <legend><span class="text">{{:: 'anonymous-policies' | translate}}</span></legend><kc-tooltip>{{:: 'anonymous-policies.tooltip' | translate}}</kc-tooltip>
  26. <table class="table table-striped table-bordered">
  27. <thead>
  28. <tr ng-show="providers.length > 0 && access.manageClients">
  29. <th colspan="5" class="kc-table-actions">
  30. <div class="pull-right">
  31. <div>
  32. <select class="form-control" ng-model="selectedProvider"
  33. ng-options="p.id for p in providers"
  34. data-ng-change="addProvider('anonymous', selectedProvider); selectedProvider = null">
  35. <option value="" disabled selected>{{:: 'add-provider.placeholder' | translate}}</option>
  36. </select>
  37. </div>
  38. </div>
  39. </th>
  40. </tr>
  41. <tr data-ng-show="anonPolicies && anonPolicies.length > 0">
  42. <th>{{:: 'policy-name' | translate}}</th>
  43. <th>{{:: 'provider-id' | translate}}</th>
  44. <th colspan="2">{{:: 'actions' | translate}}</th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <tr ng-repeat="instance in anonPolicies">
  49. <td><a href="#{{getInstanceLink(instance)}}">{{instance.name}}</a></td>
  50. <td>{{instance.providerId}}</td>
  51. <td class="kc-action-cell" kc-open="{{getInstanceLink(instance)}}">{{:: 'edit' | translate}}</td>
  52. <td class="kc-action-cell" data-ng-click="removeInstance(instance)">{{:: 'delete' | translate}}</td>
  53. </tr>
  54. <tr data-ng-show="!anonPolicies || anonPolicies.length == 0">
  55. <td class="text-muted">{{:: 'no-client-reg-policies-configured' | translate}}</td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </fieldset>
  60. <fieldset>
  61. <legend><span class="text">{{:: 'auth-policies' | translate}}</span></legend><kc-tooltip>{{:: 'auth-policies.tooltip' | translate}}</kc-tooltip>
  62. <table class="table table-striped table-bordered">
  63. <thead>
  64. <tr ng-show="providers.length > 0 && access.manageClients">
  65. <th colspan="5" class="kc-table-actions">
  66. <div class="pull-right">
  67. <div>
  68. <select class="form-control" ng-model="selectedProvider"
  69. ng-options="p.id for p in providers"
  70. data-ng-change="addProvider('authenticated', selectedProvider); selectedProvider = null">
  71. <option value="" disabled selected>{{:: 'add-provider.placeholder' | translate}}</option>
  72. </select>
  73. </div>
  74. </div>
  75. </th>
  76. </tr>
  77. <tr data-ng-show="authPolicies && authPolicies.length > 0">
  78. <th>{{:: 'policy-name' | translate}}</th>
  79. <th>{{:: 'provider-id' | translate}}</th>
  80. <th colspan="2">{{:: 'actions' | translate}}</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <tr ng-repeat="instance in authPolicies">
  85. <td><a href="#{{getInstanceLink(instance)}}">{{instance.name}}</a></td>
  86. <td>{{instance.providerId}}</td>
  87. <td class="kc-action-cell" kc-open="{{getInstanceLink(instance)}}">{{:: 'edit' | translate}}</td>
  88. <td class="kc-action-cell" data-ng-click="removeInstance(instance)">{{:: 'delete' | translate}}</td>
  89. </tr>
  90. <tr data-ng-show="!authPolicies || authPolicies.length == 0">
  91. <td class="text-muted">{{:: 'no-client-reg-policies-configured' | translate}}</td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. </fieldset>
  96. </form>
  97. </div>
  98. <kc-menu></kc-menu>