web/flows: only show permissions header when permissions are defined
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
fe2e850303
commit
67470590c2
|
@ -47,12 +47,14 @@ export class ConsentStage extends BaseStage<ConsentChallenge, ConsentChallengeRe
|
||||||
<p id="header-text">
|
<p id="header-text">
|
||||||
${this.challenge.headerText}
|
${this.challenge.headerText}
|
||||||
</p>
|
</p>
|
||||||
|
${this.challenge.permissions.length > 0 ? html`
|
||||||
<p>${t`Application requires following permissions`}</p>
|
<p>${t`Application requires following permissions`}</p>
|
||||||
<ul class="pf-c-list" id="permmissions">
|
<ul class="pf-c-list" id="permmissions">
|
||||||
${(this.challenge.permissions || []).map((permission) => {
|
${this.challenge.permissions.map((permission) => {
|
||||||
return html`<li data-permission-code="${permission.id}">${permission.name}</li>`;
|
return html`<li data-permission-code="${permission.id}">${permission.name}</li>`;
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
|
` : html``}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pf-c-form__group pf-m-action">
|
<div class="pf-c-form__group pf-m-action">
|
||||||
|
|
Reference in New Issue