diff options
Diffstat (limited to 'admin/resources/partials/authz/policy/provider')
7 files changed, 792 insertions, 0 deletions
diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-aggregate-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-aggregate-detail.html new file mode 100644 index 0000000..25be65b --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-aggregate-detail.html @@ -0,0 +1,123 @@ +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-aggregated-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'authz-aggregated' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-aggregated-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-show="!create" + data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="policies">{{:: 'authz-policy-apply-policy' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <table class="table table-striped table-bordered" style="margin-top: 0px" id="selected-policies"> + <thead> + <tr> + <th class="kc-table-actions" colspan="2"> + <div class="form-inline col-md-12" style="width: 107%"> + <div class="form-group" style="width: 100%"> + <div class="input-group" style="width: 100%"> + <input type="hidden" ui-select2="policiesUiSelect" id="policies" data-ng-change="selectPolicy(selectedPolicy);" data-ng-model="selectedPolicy" data-placeholder="{{:: 'authz-select-a-policy' | translate}}..." data-ng-required="!selectedPolicies || selectedPolicies.length == 0"/> + </div> + </div> + </div> + </th> + <th class="kc-table-actions"> + <div class="pull-right" style="width: 100%"> + <select id="create-policy" class="form-control" ng-model="policyType" + ng-options="p.name for p in policyProviders track by p.type" + data-ng-change="addPolicy(policyType);" + data-ng-hide="historyBackOnSaveOrCancel"> + <option value="" disabled selected>{{:: 'authz-create-policy' | translate}}...</option> + </select> + </div> + </th> + </tr> + <tr data-ng-hide="!selectedPolicies || selectedPolicies.length == 0"> + <th>{{:: 'name' | translate}}</th> + <th>{{:: 'description' | translate}}</th> + <th width="20%">{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="policy in selectedPolicies"> + <td data-ng-hide="historyBackOnSaveOrCancel"><a href="" data-ng-click="detailPolicy(policy)">{{policy.name}}</a></td> + <td data-ng-show="historyBackOnSaveOrCancel">{{policy.name}}</td> + <td>{{policy.description}}</td> + <td class="kc-action-cell" ng-click="removePolicy(selectedPolicies, policy);" style="vertical-align: middle"> + {{:: 'remove' | translate}} + </td> + </tr> + <tr data-ng-show="!selectedPolicies || selectedPolicies.length == 0"> + <td class="text-muted" colspan="3">{{:: 'authz-no-policies-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + <kc-tooltip>{{:: 'authz-policy-apply-policy.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="policy.decisionStrategy">{{:: 'authz-policy-decision-strategy' | translate}}</label> + <div class="col-sm-2"> + <select class="form-control" id="policy.decisionStrategy" + data-ng-model="policy.decisionStrategy" + ng-change="selectDecisionStrategy()"> + <option value="UNANIMOUS">{{:: 'authz-policy-decision-strategy-unanimous' | translate}}</option> + <option value="AFFIRMATIVE">{{:: 'authz-policy-decision-strategy-affirmative' | translate}}</option> + <option value="CONSENSUS">{{:: 'authz-policy-decision-strategy-consensus' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-decision-strategy.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" name="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed || (selectedPolicies == null || selectedPolicies.length == 0)">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-client-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-client-detail.html new file mode 100644 index 0000000..9c5630a --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-client-detail.html @@ -0,0 +1,93 @@ +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-client-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'client' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-client-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-show="!create" + data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="clients">{{:: 'clients' | translate}} <span class="required">*</span></label> + + <div class="col-md-6"> + <input type="hidden" ui-select2="clientsUiSelect" id="clients" data-ng-model="selectedClient" data-ng-change="selectClient(selectedClient);" data-placeholder="Select an client..." data-ng-required="selectedClients.length == 0"> + </input> + </div> + <kc-tooltip>{{:: 'authz-policy-client-clients.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix" style="margin-top: -15px;"> + <label class="col-md-2 control-label"></label> + <div class="col-sm-3"> + <table class="table table-striped table-bordered" id="selected-clients"> + <thead> + <tr data-ng-hide="!selectedClients.length"> + <th>{{:: 'clientId' | translate}}</th> + <th>{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="client in selectedClients | orderBy:'clientId'"> + <td>{{client.clientId}}</td> + <td class="kc-action-cell"> + <button class="btn btn-default btn-block btn-sm" ng-click="removeFromList(client);">{{:: 'remove' | translate}}</button> + </td> + </tr> + <tr data-ng-show="!selectedClients.length"> + <td class="text-muted" colspan="3">{{:: 'authz-no-clients-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-group-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-group-detail.html new file mode 100644 index 0000000..cc1353b --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-group-detail.html @@ -0,0 +1,126 @@ +<!-- + ~ * Copyright 2017 Red Hat, Inc. and/or its affiliates + ~ * and other contributors as indicated by the @author tags. + ~ * + ~ * Licensed under the Apache License, Version 2.0 (the "License"); + ~ * you may not use this file except in compliance with the License. + ~ * You may obtain a copy of the License at + ~ * + ~ * http://www.apache.org/licenses/LICENSE-2.0 + ~ * + ~ * Unless required by applicable law or agreed to in writing, software + ~ * distributed under the License is distributed on an "AS IS" BASIS, + ~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ * See the License for the specific language governing permissions and + ~ * limitations under the License. + --> + +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-group-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'groups' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-group-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-show="!create" + data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="groupPolicyForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="groupsClaim">{{:: 'authz-policy-group-claim' | translate}}</label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="groupsClaim" name="groupsClaim" data-ng-model="policy.groupsClaim"> + </div> + <kc-tooltip>{{:: 'authz-policy-group-claim.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="selectedGroups">{{:: 'groups' | translate}} <span class="required">*</span></label> + <div class="col-md-6"> + <div tree-id="tree" + angular-treeview="true" + tree-model="groupList" + node-id="id" + node-label="name" + node-children="subGroups" > + </div> + <button data-ng-click="selectGroup(tree.currentNode)" id="selectGroup" class="btn btn-primary" data-ng-disabled="tree.currentNode == null">Select</button> + <input class="form-control" type="text" id="selectedGroups" name="selectedGroups" data-ng-model="noop" data-ng-required="selectedGroups.length <= 0" autofocus required data-ng-show="false"> + </div> + <kc-tooltip>{{:: 'authz-policy-user-users.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group" data-ng-if="selectedGroups.length > 0"> + <label class="col-md-2 control-label"></label> + <div class="col-md-5"> + <table class="table table-striped table-bordered" id="selected-groups"> + <thead> + <tr> + <th>{{:: 'path' | translate}}</th> + <th class="col-sm-3">Extend to Children</th> + <th>{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="group in selectedGroups | orderBy:'name' track by $index"> + <td>{{group.path}}</td> + <td> + <input type="checkbox" ng-model="group.extendChildren" id="{{role.id}}" data-ng-click="extendChildren()"> + </td> + <td class="kc-action-cell"> + <button class="btn btn-default btn-block btn-sm" ng-click="removeFromList(group);">{{:: 'remove' | translate}}</button> + </td> + </tr> + <tr data-ng-show="!selectedGroups.length"> + <td class="text-muted" colspan="3">{{:: 'authz-no-groups-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-js-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-js-detail.html new file mode 100644 index 0000000..172c2b6 --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-js-detail.html @@ -0,0 +1,69 @@ +<style> + .ace_editor { height: 200px; } +</style> +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-js-policy' | translate}}</li> + <li data-ng-hide="create">JavaScript</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-js-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()" data-ng-disabled="readOnly"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description" data-ng-disabled="readOnly"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="code">{{:: 'authz-policy-js-code' | translate}} </label> + <div class="col-sm-6"> + <div ui-ace="{ onLoad : initEditor }" id="code" data-ng-model="policy.code"></div> + </div> + <kc-tooltip>{{:: 'authz-policy-js-code.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic" data-ng-disabled="readOnly"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-role-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-role-detail.html new file mode 100644 index 0000000..9448682 --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-role-detail.html @@ -0,0 +1,169 @@ +<!-- + ~ JBoss, Home of Professional Open Source. + ~ Copyright 2016 Red Hat, Inc., and individual contributors + ~ as indicated by the @author tags. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-role-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'roles' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-role-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-show="!create" + data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="roles">{{:: 'realm-roles' | translate}} <span class="required">*</span></label> + + <div class="col-md-4"> + <select ui-select2="{ minimumInputLength: 1}" id="roles" data-ng-model="selectedRole" data-ng-change="selectRole(selectedRole);" data-placeholder="{{:: 'select-a-role' | translate}}..." + ng-options="role as role.name for role in roles" data-ng-required="selectedRoles.length == 0"> + <option></option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-role-realm-roles.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix" style="margin-top: -15px;"> + <label class="col-md-2 control-label"></label> + <div class="col-sm-4" data-ng-show="hasRealmRole()"> + <table class="table table-striped table-bordered" id="selected-realm-roles"> + <thead> + <tr> + <th class="col-sm-5">{{:: 'name' | translate}}</th> + <th>{{:: 'authz-required' | translate}}</th> + <th>{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="role in selectedRoles | orderBy:'name'" ng-if="!role.clientRole"> + <td>{{role.name}}</td> + <td><input type="checkbox" ng-model="role.required" id="{{role.id}}"></td> + <td class="kc-action-cell"> + <button class="btn btn-default btn-block btn-sm" ng-click="removeFromList(role);">{{:: 'remove' | translate}}</button> + </td> + </tr> + <tr data-ng-show="!selectedRoles.length"> + <td class="text-muted" colspan="3">{{:: 'authz-no-roles-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="clients">{{:: 'clients' | translate}}</label> + + <div class="col-md-4"> + <select class="form-control" id="clients" + ng-model="selectedClient" + ng-change="selectClient()" + data-ng-options="current as current.clientId for current in clients"> + <option value="">{{:: 'selectOne' | translate}}...</option> + </select> + </div> + <kc-tooltip>{{:: 'authz-policy-role-clients.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="clientRoles">{{:: 'client-roles' | translate}} <span class="required">*</span></label> + + <div class="col-md-4"> + <select ui-select2="{ minimumInputLength: 1}" id="clientRoles" data-ng-model="selectedRole" data-ng-change="selectRole(selectedRole);" data-placeholder="{{:: 'select-a-role' | translate}}..." + ng-options="role as role.name for role in clientRoles" data-ng-required="selectedRoles.length == 0" data-ng-disabled="!selectedClient"> + <option></option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-role-client-roles.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix" style="margin-top: -15px;"> + <label class="col-md-2 control-label"></label> + <div class="col-sm-4" data-ng-show="hasClientRole()"> + <table class="table table-striped table-bordered" id="selected-client-roles"> + <thead> + <tr> + <th class="col-sm-5">{{:: 'name' | translate}}</th> + <th class="col-sm-5">{{:: 'client' | translate}}</th> + <th>{{:: 'authz-required' | translate}}</th> + <th>{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="role in selectedRoles | orderBy:'name'" ng-if="role.clientRole"> + <td>{{role.name}}</td> + <td>{{role.container.name}}</td> + <td><input type="checkbox" ng-model="role.required" id="{{role.id}}"></td> + <td class="kc-action-cell"> + <button class="btn btn-default btn-block btn-sm" ng-click="removeFromList(role);">{{:: 'remove' | translate}}</button> + </td> + </tr> + <tr data-ng-show="!selectedRoles.length"> + <td class="text-muted" colspan="3">{{:: 'authz-no-roles-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed && !historyBackOnSaveOrCancel">{{:: 'cancel' | translate}}</button> + </div> + </div> + {{policyState.page.previous}} + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-time-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-time-detail.html new file mode 100644 index 0000000..4af9014 --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-time-detail.html @@ -0,0 +1,119 @@ +<style> + .ace_editor { height: 200px; } +</style> +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-time-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'time' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + + <h1 data-ng-show="create">{{:: 'authz-add-time-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="notBefore">{{:: 'not-before' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" style="width: 150px" type="text" id="notBefore" name="notBefore" data-ng-model="policy.notBefore" placeholder="yyyy-MM-dd hh:mm:ss" data-ng-required="isRequired()"> + </div> + <kc-tooltip>{{:: 'authz-policy-time-not-before.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="notOnOrAfter">{{:: 'authz-policy-time-not-on-after' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" style="width: 150px" type="text" id="notOnOrAfter" name="notOnOrAfter" data-ng-model="policy.notOnOrAfter" placeholder="yyyy-MM-dd hh:mm:ss" data-ng-required="isRequired()"> + </div> + <kc-tooltip>{{:: 'authz-policy-time-not-on-after.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="dayMonth">{{:: 'authz-policy-time-day-month' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" type="number" min="1" max="31" data-ng-model="policy.dayMonth" id="dayMonth" name="dayMonth" data-ng-required="isRequired()"/> to <input class="form-control" type="number" min="{{policy.dayMonth}}" max="31" data-ng-model="policy.dayMonthEnd" id="dayMonthEnd" name="dayMonthEnd"/> + </div> + <kc-tooltip>{{:: 'authz-policy-time-day-month.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="month">{{:: 'authz-policy-time-month' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" type="number" min="1" max="12" data-ng-model="policy.month" id="month" name="month" data-ng-required="isRequired()"/> to <input class="form-control" type="number" min="{{policy.month}}" max="12" data-ng-model="policy.monthEnd" id="monthEnd" name="monthEnd"/> + </div> + <kc-tooltip>{{:: 'authz-policy-time-month.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="year">{{:: 'authz-policy-time-year' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" type="number" data-ng-model="policy.year" id="year" name="year" data-ng-required="isRequired()"/> to <input class="form-control" type="number" min="{{policy.year}}" max="2050" data-ng-model="policy.yearEnd" id="yearEnd" name="yearEnd"/> + </div> + <kc-tooltip>{{:: 'authz-policy-time-year.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="hour">{{:: 'authz-policy-time-hour' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" type="number" min="0" max="23" data-ng-model="policy.hour" id="hour" name="hour" data-ng-required="isRequired()"/> to <input class="form-control" type="number" min="{{policy.hour}}" max="23" data-ng-model="policy.hourEnd" id="hourEnd" name="hourEnd"/> + </div> + <kc-tooltip>{{:: 'authz-policy-time-hour.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="minute">{{:: 'authz-policy-time-minute' | translate}}</label> + + <div class="col-md-6 time-selector"> + <input class="form-control" type="number" min="0" max="59" data-ng-model="policy.minute" id="minute" name="minute" data-ng-required="isRequired()"/> to <input class="form-control" type="number" min="{{policy.minute}}" max="59" data-ng-model="policy.minuteEnd" id="minuteEnd" name="minuteEnd"/> + </div> + <kc-tooltip>{{:: 'authz-policy-time-minute.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file diff --git a/admin/resources/partials/authz/policy/provider/resource-server-policy-user-detail.html b/admin/resources/partials/authz/policy/provider/resource-server-policy-user-detail.html new file mode 100644 index 0000000..80d81ac --- /dev/null +++ b/admin/resources/partials/authz/policy/provider/resource-server-policy-user-detail.html @@ -0,0 +1,93 @@ +<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2"> + + <ol class="breadcrumb"> + <li><a href="#/realms/{{realm.realm}}/clients">{{:: 'clients' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li> + <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/policy">{{:: 'authz-policies' | translate}}</a></li> + <li data-ng-show="policyState.state.policy.name != null && historyBackOnSaveOrCancel">{{policyState.state.policy.name}}</li> + <li data-ng-show="policyState.state.policy.name == null && historyBackOnSaveOrCancel">{{:: policyState.state.previousPage.name | translate}}</li> + <li data-ng-show="create">{{:: 'authz-add-user-policy' | translate}}</li> + <li data-ng-hide="create">{{:: 'user' | translate}}</li> + <li data-ng-hide="create">{{originalPolicy.name}}</li> + </ol> + + <h1 data-ng-show="create">{{:: 'authz-add-user-policy' | translate}}</h1> + <h1 data-ng-hide="create">{{originalPolicy.name|capitalize}}<i class="pficon pficon-delete clickable" data-ng-show="!create" + data-ng-click="remove()"></i></h1> + + <form class="form-horizontal" name="clientForm" novalidate> + <fieldset class="border-top"> + <div class="form-group"> + <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} <span class="required">*</span></label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="name" name="name" data-ng-model="policy.name" autofocus required data-ng-blur="checkNewNameAvailability()"> + </div> + <kc-tooltip>{{:: 'authz-policy-name.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group"> + <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label> + <div class="col-sm-6"> + <input class="form-control" type="text" id="description" name="description" data-ng-model="policy.description"> + </div> + <kc-tooltip>{{:: 'authz-policy-description.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="users">{{:: 'users' | translate}} <span class="required">*</span></label> + + <div class="col-md-6"> + <input type="hidden" ui-select2="usersUiSelect" id="users" data-ng-model="selectedUser" data-ng-change="selectUser(selectedUser);" data-placeholder="Select an user..." data-ng-required="selectedUsers.length == 0""> + </input> + </div> + <kc-tooltip>{{:: 'authz-policy-user-users.tooltip' | translate}}</kc-tooltip> + </div> + <div class="form-group clearfix" style="margin-top: -15px;"> + <label class="col-md-2 control-label"></label> + <div class="col-sm-3"> + <table class="table table-striped table-bordered" id="selected-users"> + <thead> + <tr data-ng-hide="!selectedUsers.length"> + <th>{{:: 'username' | translate}}</th> + <th>{{:: 'actions' | translate}}</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="user in selectedUsers | orderBy:'username'"> + <td>{{user.username}}</td> + <td class="kc-action-cell"> + <button class="btn btn-default btn-block btn-sm" ng-click="removeFromList(selectedUsers, user);">{{:: 'remove' | translate}}</button> + </td> + </tr> + <tr data-ng-show="!selectedUsers.length"> + <td class="text-muted" colspan="3">{{:: 'authz-no-users-assigned' | translate}}</td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="form-group clearfix"> + <label class="col-md-2 control-label" for="logic">{{:: 'authz-policy-logic' | translate}}</label> + + <div class="col-sm-1"> + <select class="form-control" id="logic" + data-ng-model="policy.logic"> + <option value="POSITIVE">{{:: 'authz-policy-logic-positive' | translate}}</option> + <option value="NEGATIVE">{{:: 'authz-policy-logic-negative' | translate}}</option> + </select> + </div> + + <kc-tooltip>{{:: 'authz-policy-logic.tooltip' | translate}}</kc-tooltip> + </div> + <input type="hidden" data-ng-model="policy.type"/> + </fieldset> + + <div class="form-group" data-ng-show="access.manageAuthorization"> + <div class="col-md-10 col-md-offset-2"> + <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button> + <button kc-reset data-ng-disabled="!changed && !historyBackOnSaveOrCancel">{{:: 'cancel' | translate}}</button> + </div> + </div> + </form> +</div> + +<kc-menu></kc-menu>
\ No newline at end of file |