[GH-ISSUE #18488] After logging in, the left nav is stuck loading #18612

Closed
opened 2026-04-20 00:49:38 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @pekrockstar on GitHub (Oct 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18488

7a83e7dfa3/src/lib/components/chat/Navbar.svelte (L204)

This part should be changed like this:

 {#if $user?.role === 'admin' || ($user?.permissions?.chat?.controls ?? true)} 

permissions.chat? change to permissions?.chat?

Originally created by @pekrockstar on GitHub (Oct 21, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/18488 https://github.com/open-webui/open-webui/blob/7a83e7dfa367d19f762ec17cac5e4a94ea2bd97d/src/lib/components/chat/Navbar.svelte#L204 This part should be changed like this: ```javascript {#if $user?.role === 'admin' || ($user?.permissions?.chat?.controls ?? true)} ``` `permissions.chat?` change to `permissions?.chat?`
Author
Owner

@silentoplayz commented on GitHub (Oct 21, 2025):

More info is wanted here. Why is this change needed?

{#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} can also be found in src/lib/components/chat/Controls/Controls.svelte. Does that not need changed from permissions.chat? to permissions?.chat? as well?

<!-- gh-comment-id:3425602593 --> @silentoplayz commented on GitHub (Oct 21, 2025): More info is wanted here. Why is this change needed? `{#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}` can also be found in `src/lib/components/chat/Controls/Controls.svelte`. Does that not need changed from `permissions.chat?` to `permissions?.chat?` as well?
Author
Owner

@rgaricano commented on GitHub (Oct 21, 2025):

No, that change isn't neccessary, permissions are explicit for users, if user exists then user.permissions too.

<!-- gh-comment-id:3425726079 --> @rgaricano commented on GitHub (Oct 21, 2025): No, that change isn't neccessary, permissions are explicit for users, if user exists then user.permissions too.
Author
Owner

@pekrockstar commented on GitHub (Oct 21, 2025):

Yes, all {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)} need to be changed to {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}, otherwise Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'chat') error will be reported.

Image

After logging in, the first thing I noticed was that the menu on the left kept loading, and the other errors could only be found after clicking into the corresponding pages.

<!-- gh-comment-id:3425745483 --> @pekrockstar commented on GitHub (Oct 21, 2025): Yes, all `{#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}` need to be changed to ` {#if $user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true)}`, otherwise `Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'chat')` error will be reported. <img width="687" height="64" alt="Image" src="https://github.com/user-attachments/assets/f26c65c4-d9c2-425e-9039-3165543b0e0d" /> After logging in, the first thing I noticed was that the menu on the left kept loading, and the other errors could only be found after clicking into the corresponding pages.
Author
Owner

@pekrockstar commented on GitHub (Oct 21, 2025):

No, that change isn't neccessary, permissions are explicit for users, if user exists then user.permissions too.

yes,that change isn't necessary, If you have not customized other login methods, because the previous auths.py code does not have return permissions field, this should be the latest newly added field, THANKS ALL!

<!-- gh-comment-id:3425808560 --> @pekrockstar commented on GitHub (Oct 21, 2025): > No, that change isn't neccessary, permissions are explicit for users, if user exists then user.permissions too. yes,that change isn't necessary, If you have not customized other login methods, because the previous `auths.py` code does not have return `permissions` field, this should be the latest newly added field, THANKS ALL!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18612