@let url = kcContext.url; @let stateChecker = kcContext.stateChecker; @let applications = kcContext.applications?.applications;

{{ i18n.msgStr('applicationsHtmlTitle') }}

@for (application of applications ?? []; track application) { }
{{ i18n.msgStr('application') }} {{ i18n.msgStr('availableRoles') }} {{ i18n.msgStr('grantedPermissions') }} {{ i18n.msgStr('additionalGrants') }} {{ i18n.msgStr('action') }}
@if (application.effectiveUrl) { @if (application.client.name) { {{ i18n.advancedMsgStr(application.client.name) }} } @else { {{ application.client.clientId }} } } @else { @if (application.client.name) { {{ i18n.advancedMsgStr(application.client.name) }} } @else { {{ application.client.clientId }} } } @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) { @for (role of application.realmRolesAvailable; track role; let last = $last) { @if (role.description) { {{ i18n.advancedMsgStr(role.description) }} } @else { {{ i18n.advancedMsgStr(role.name) }} } @if (!last) { ,  } } } @if (application.resourceRolesAvailable) { @for (resource of application.resourceRolesAvailable | keyvalue; track resource.key) { @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) { ,  } @for ( clientRole of application.resourceRolesAvailable[resource.key]; track clientRole; let roleLast = $last ) { {{ i18n.advancedMsgStr(clientRole.roleDescription ? clientRole.roleDescription : clientRole.roleName) }} {{ i18n.msgStr('inResource') }} {{ clientRole.clientName ? i18n.advancedMsgStr(clientRole.clientName) : clientRole.clientId }} @if (!roleLast) { ,  } } } } @if (application.client.consentRequired) { @for (claim of application.clientScopesGranted; track claim; let last = $last) { {{ i18n.advancedMsgStr(claim) }} @if (!last) { ,  } } } @else { {{ i18n.msgStr('fullAccess') }} } @for (grant of application.additionalGrants; track grant; let last = $last) { {{ i18n.advancedMsgStr(grant) }} @if (!last) { ,  } } @if ( (application.client.consentRequired && application.clientScopesGranted.length > 0) || application.additionalGrants.length > 0 ) { }