aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'admin/resources/partials/authz/permission')
-rw-r--r--admin/resources/partials/authz/permission/provider/resource-server-policy-resource-detail.html131
-rw-r--r--admin/resources/partials/authz/permission/provider/resource-server-policy-scope-detail.html134
-rw-r--r--admin/resources/partials/authz/permission/resource-server-permission-list.html118
3 files changed, 383 insertions, 0 deletions
diff --git a/admin/resources/partials/authz/permission/provider/resource-server-policy-resource-detail.html b/admin/resources/partials/authz/permission/provider/resource-server-policy-resource-detail.html
new file mode 100644
index 0000000..af5aace
--- /dev/null
+++ b/admin/resources/partials/authz/permission/provider/resource-server-policy-resource-detail.html
@@ -0,0 +1,131 @@
+<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/permission">{{:: 'authz-permissions' | translate}}</a></li>
+ <li data-ng-show="create">{{:: 'authz-add-resource-permission' | translate}}</li>
+ <li data-ng-hide="create">{{originalPolicy.name}}</li>
+ </ol>
+
+ <h1 data-ng-show="create">{{:: 'authz-add-resource-permission' | 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-permission-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-permission-description.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group">
+ <label class="col-md-2 control-label" for="applyToResourceTypeFlag">{{:: 'authz-permission-resource-apply-to-resource-type' | translate}}</label>
+ <div class="col-md-6">
+ <input ng-model="applyToResourceTypeFlag" id="applyToResourceTypeFlag" onoffswitch data-ng-click="applyToResourceType()"/>
+ </div>
+ <kc-tooltip>{{:: 'authz-permission-resource-apply-to-resource-type.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix" data-ng-hide="applyToResourceTypeFlag">
+ <label class="col-md-2 control-label" for="resources">{{:: 'authz-resources' | translate}} <span class="required">*</span></label>
+
+ <div class="col-md-6">
+ <input type="hidden" ui-select2="resourcesUiSelect" id="resources" data-ng-model="selectedResource" data-placeholder="{{:: 'authz-select-resource' | translate}}..." data-ng-required="!applyToResourceTypeFlag"/>
+ </div>
+ <kc-tooltip>{{:: 'authz-permission-resource-resource.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix" data-ng-show="applyToResourceTypeFlag">
+ <label class="col-md-2 control-label" for="resourceType">{{:: 'authz-resource-type' | translate}} <span class="required">*</span></label>
+
+ <div class="col-md-6">
+ <input class="form-control" type="text" id="resourceType" name="policy.resourceType" data-ng-model="policy.resourceType" data-ng-required="applyToResourceTypeFlag">
+ </div>
+
+ <kc-tooltip>{{:: 'authz-permission-resource-type.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix">
+ <label class="col-md-2 control-label" for="policies">{{:: 'authz-policy-apply-policy' | translate}}</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}}..."/>
+ </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="decisionStrategy">{{:: 'authz-policy-decision-strategy' | translate}}</label>
+
+ <div class="col-sm-2">
+ <select class="form-control" id="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>
+ <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/permission/provider/resource-server-policy-scope-detail.html b/admin/resources/partials/authz/permission/provider/resource-server-policy-scope-detail.html
new file mode 100644
index 0000000..17ee7cb
--- /dev/null
+++ b/admin/resources/partials/authz/permission/provider/resource-server-policy-scope-detail.html
@@ -0,0 +1,134 @@
+<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/permission">{{:: 'authz-permissions' | translate}}</a></li>
+ <li data-ng-show="create">{{:: 'authz-add-scope-permission' | translate}}</li>
+ <li data-ng-hide="create">{{originalPolicy.name}}</li>
+ </ol>
+
+ <h1 data-ng-show="create">{{:: 'authz-add-scope-permission' | 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-permission-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-permission-description.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix">
+ <label class="col-md-2 control-label" for="resources">{{:: 'authz-resource' | translate}}</label>
+
+ <div class="col-md-6">
+ <input type="hidden" ui-select2="resourcesUiSelect" data-ng-change="selectResource()" id="resources" data-ng-model="selectedResource" data-placeholder="{{:: 'authz-any-resource' | translate}}..." />
+ </div>
+ <kc-tooltip>{{:: 'authz-permission-scope-resource.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix" data-ng-show="selectedResource">
+ <label class="col-md-2 control-label" for="resourceScopes">{{:: 'authz-scopes' | translate}} <span class="required">*</span></label>
+ <div class="col-md-6">
+ <select ui-select2 id="resourceScopes"
+ data-ng-model="selectedScopes"
+ data-placeholder="{{:: 'authz-any-scope' | translate}}..." multiple
+ data-ng-required="selectedResource != null">
+ <option ng-repeat="scope in resourceScopes" value="{{scope.id}}">{{scope.name}}</option>
+ </select>
+ </div>
+ <kc-tooltip>{{:: 'authz-permission-scope-scope.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix" data-ng-show="!selectedResource">
+ <label class="col-md-2 control-label" for="scopes">{{:: 'authz-scopes' | translate}} <span class="required">*</span></label>
+
+ <div class="col-md-6">
+ <input type="hidden" ui-select2="scopesUiSelect" id="scopes" data-ng-model="selectedScopes" data-placeholder="{{:: 'authz-any-scope' | translate}}..." multiple data-ng-required="selectedResource == null" />
+ </div>
+ <kc-tooltip>{{:: 'authz-permission-scope-scope.tooltip' | translate}}</kc-tooltip>
+ </div>
+ <div class="form-group clearfix">
+ <label class="col-md-2 control-label" for="policies">{{:: 'authz-policy-apply-policy' | translate}}</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}}..."/>
+ </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="decisionStrategy">{{:: 'authz-policy-decision-strategy' | translate}}</label>
+
+ <div class="col-sm-2">
+ <select class="form-control" id="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>
+ <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/permission/resource-server-permission-list.html b/admin/resources/partials/authz/permission/resource-server-permission-list.html
new file mode 100644
index 0000000..40dfacd
--- /dev/null
+++ b/admin/resources/partials/authz/permission/resource-server-permission-list.html
@@ -0,0 +1,118 @@
+<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/permission">{{:: 'authz-permissions' | translate}}</a></li>
+ </ol>
+
+ <kc-tabs-resource-server></kc-tabs-resource-server>
+
+ <table class="table table-striped table-bordered">
+ <thead>
+ <tr>
+ <th class="kc-table-actions" colspan="5">
+ <div class="form-inline">
+ <div class="form-group">
+ {{:: 'filter' | translate}}:&nbsp;&nbsp;
+ <div class="input-group">
+ <input type="text" placeholder="{{:: 'name' | translate}}" data-ng-model="query.name" class="form-control search" onkeydown="if (event.keyCode == 13) document.getElementById('policySearch').click()">
+ <div class="input-group-addon">
+ <i class="fa fa-search" id="policySearch" type="submit" data-ng-click="firstPage()"></i>
+ </div>
+ </div>
+ <div class="input-group">
+ <input type="text" placeholder="{{:: 'authz-resource' | translate}}" data-ng-model="query.resource" class="form-control search" onkeydown="if (event.keyCode == 13) document.getElementById('policySearch').click()">
+ <div class="input-group-addon">
+ <i class="fa fa-search" type="submit" data-ng-click="firstPage()"></i>
+ </div>
+ </div>
+ <div class="input-group">
+ <input type="text" placeholder="{{:: 'authz-scope' | translate}}" data-ng-model="query.scope" class="form-control search" onkeydown="if (event.keyCode == 13) document.getElementById('policySearch').click()">
+ <div class="input-group-addon">
+ <i class="fa fa-search" type="submit" data-ng-click="firstPage()"></i>
+ </div>
+ </div>
+ <div class="input-group">
+ <select class="form-control search" data-ng-model="query.type"
+ ng-options="p.type as p.name group by p.group for p in policyProviders track by p.type" data-ng-change="firstPage()">
+ <option value="" selected ng-click="query.type = ''">{{:: 'authz-all-types' | translate}}</option>
+ </select>
+ </div>
+ </div>
+ <div class="pull-right">
+ <select class="form-control" ng-model="policyType"
+ ng-options="p.name for p in policyProviders track by p.type"
+ id="create-permission"
+ data-ng-change="addPolicy(policyType);">
+ <option value="" disabled selected>{{:: 'authz-create-permission' | translate}}...</option>
+ </select>
+ </div>
+ </div>
+ </th>
+ </tr>
+ <tr data-ng-hide="policies.length == 0">
+ <th width="1%"></th>
+ <th>{{:: 'name' | translate}}</th>
+ <th>{{:: 'description' | translate}}</th>
+ <th width="7%">{{:: 'type' | translate}}</th>
+ <th width="6%" style="text-align: center;">{{:: 'actions' | translate}}</th>
+ </tr>
+ </thead>
+ <tfoot data-ng-show="policies && (policies.length >= query.max || query.first > 0)">
+ <tr>
+ <td colspan="5">
+ <div class="table-nav">
+ <button data-ng-click="firstPage()" class="first" ng-disabled="query.first == 0">{{:: 'first-page' | translate}}</button>
+ <button data-ng-click="previousPage()" class="prev" ng-disabled="query.first == 0">{{:: 'previous-page' | translate}}</button>
+ <button data-ng-click="nextPage()" class="next" ng-disabled="policies.length < query.max">{{:: 'next-page' | translate}}</button>
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <tr ng-repeat-start="policy in policies | filter: {name: search.name, type: search.type} | orderBy:'name'" data-ng-click="showDetails(policy, $event);" style="cursor: pointer">
+ <td>
+ <span ng-if="!policy.details || !policy.details.loaded" class="fa fa-angle-right"></span>
+ <span ng-if="policy.details && policy.details.loaded" class="fa fa-angle-right fa-angle-down"></span>
+ </td>
+ <td><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/permission/{{policy.type}}/{{policy.id}}">{{policy.name}}</a></td>
+ <td>{{policy.description}}</td>
+ <td>{{policy.type}}</td>
+ <td align="center">
+ <div class="dropdown dropdown-kebab-pf">
+ <button class="btn btn-default" ng-click="delete(policy);">{{:: 'delete' | translate}}
+ </button>
+ </div>
+ </td>
+ </tr>
+ <tr ng-if="policy.details && policy.details.loaded" ng-repeat-end="">
+ <td colspan="5" style="background-color: #ffffff">
+ <div class="list-group-item-container container-fluid">
+ <div class="close" data-ng-click="showDetails(policy, $event);" style="padding-top: 10px">
+ <span class="pficon pficon-close"></span>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <dl class="dl-horizontal">
+ <dt>{{:: 'authz-associated-policies' | translate}}</dt>
+ <dd>
+ <span data-ng-show="policy.associatedPolicies && !policy.associatedPolicies.length">{{:: 'authz-no-policies-available' | translate}}</span>
+ <span ng-repeat="dep in policy.associatedPolicies" data-ng-show="policy.associatedPolicies.length > 0"><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server/{{dep.type == 'scope' || dep.type == 'resource' ? 'permission' : 'policy'}}/{{dep.type}}/{{dep.id}}">{{dep.name}}</a>{{$last ? '' : ', '}}</span>
+ </dd>
+ </dl>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ <tr data-ng-show="(policies | filter:search).length == 0">
+ <td class="text-muted" colspan="3" data-ng-show="search.name">{{:: 'no-results' | translate}}</td>
+ <td class="text-muted" colspan="3" data-ng-hide="search.name">{{:: 'authz-no-permissions-available' | translate}}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<kc-menu></kc-menu> \ No newline at end of file