user-consents.html

54 lines | 2.098 kB Blame History Raw Download
<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}}/users">Users</a></li>
        <li>{{user.username}}</li>
    </ol>

    <kc-tabs-user></kc-tabs-user>

    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th>Client</th>
            <th>Granted Roles</th>
            <th>Granted Protocol Mappers</th>
            <th>Additional Grants</th>
            <th>Action</th>
        </tr>
        </thead>
        <tbody>
        <tr data-ng-repeat="consent in userConsents">
            <td>{{consent.clientId}}</td>
            <td>
                <span data-ng-repeat="realmRole in consent.grantedRealmRoles">
                    <span ng-if="!$first">, </span>{{realmRole}}
                </span>
                <span data-ng-repeat="(clientId, clientRoles) in consent.grantedClientRoles">
                    <span data-ng-repeat="clientRole in clientRoles">
                        <span ng-if="!$first || consent.grantedRealmRoles.length > 0">, </span>{{clientRole}} in {{clientId}}
                    </span>
                </span>
            </td>
            <td>
                <span data-ng-repeat="protocol in consent.grantedProtocolMappers">
                    <span data-ng-repeat="protocolMapper in protocol">
                        <span ng-if="!$first">, </span>{{protocolMapper}}
                    </span>
                </span>
            </td>
            <td>
                <span data-ng-repeat="additionalGrant in consent.additionalGrants">
                    <span ng-if="!$first">, </span><a href="#/realms/{{realm.realm}}/users/{{user.id}}/offline-sessions/{{additionalGrant.client}}">{{additionalGrant.key}}</a>
                </span>
            </td>
            <td class="kc-action-cell">
                <button class="btn btn-default btn-block btn-sm" ng-click="revokeConsent(consent.clientId)">
                    <i class="pficon pficon-delete"></i> Revoke
                </button>
            </td>
        </tr>
        </tbody>
    </table>
</div>

<kc-menu></kc-menu>