Skip to content

Commit

Permalink
Merge pull request #24 from vtfk/prod-test
Browse files Browse the repository at this point in the history
block
  • Loading branch information
robinElli authored Nov 20, 2023
2 parents a9c1ab4 + 71db55b commit 3362bea
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/routes/authenticated/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
let user
let accessToken
let roles
let isUserBlocked = false
onMount(async () => {
user = get(userStore)
Expand All @@ -38,6 +39,9 @@
} else {
msalUser = {}
}
if(get(userRoles).includes('chatVTFK.block')) {
isUserBlocked = true
}
})
// This function only exists to create a delay for the store to actually get the values.
Expand Down Expand Up @@ -76,7 +80,12 @@
<div class="contentWrapper">
<div class="content">
<h2> Hei, {msalUser.name} 🤓</h2>
<slot></slot>
{#if !isUserBlocked}
<slot></slot>
{:else}
<p>Av ulike grunner er brukeren din blokkert. Mener du at dette er feil kontakt servicedesk 🧑‍💻</p>
{/if}
</div>
</div>
{/await}
Expand Down Expand Up @@ -136,6 +145,17 @@
margin-left: 0.5rem;
}
p {
font-size: larger;
font-style: normal;
font-weight: bold;
padding: 1rem;
display: flex;
justify-content: center;
margin-left: 5rem;
margin-right: 5rem;
}
@media(max-width: 885px) {
.sideNavWrapper {
display: none;
Expand Down

1 comment on commit 3362bea

@vercel
Copy link

@vercel vercel bot commented on 3362bea Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chat-vtfk-web – ./

chat-vtfk-web-git-main-vtfk.vercel.app
chat-vtfk-web-vtfk.vercel.app
chat-vtfk-web.vercel.app
chat.vtfk.no

Please sign in to comment.