Skip to content
Snippets Groups Projects
Commit 1566495a authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Implement noAuth parameter

parent 8bfccaa8
No related branches found
No related tags found
No related merge requests found
......@@ -8,11 +8,13 @@ class PersonSelectDemo extends LitElement {
constructor() {
super();
this.lang = 'de';
this.noAuth = false;
}
static get properties() {
return {
lang: { type: String },
noAuth: { type: Boolean, attribute: 'no-auth' },
};
}
......@@ -24,6 +26,14 @@ class PersonSelectDemo extends LitElement {
});
}
getAuthComponentHtml() {
return this.noAuth ? html`` : html`
<div class="container">
<vpu-auth lang="${this.lang}" client-id="${commonUtils.setting('keyCloakClientId')}" load-person></vpu-auth>
</div>
`;
}
render() {
commonUtils.initAssetBaseURL('vpu-person-select-src');
const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath);
......@@ -34,9 +44,7 @@ class PersonSelectDemo extends LitElement {
<div class="container">
<h1 class="title">Person-Select-Demo</h1>
</div>
<div class="container">
<vpu-auth lang="${this.lang}" client-id="${commonUtils.setting('keyCloakClientId')}" load-person></vpu-auth>
</div>
${this.getAuthComponentHtml()}
<div class="container">
<form>
<div class="field">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment