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?`
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?
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.
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.
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.
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!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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:
permissions.chat?change topermissions?.chat?@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 insrc/lib/components/chat/Controls/Controls.svelte. Does that not need changed frompermissions.chat?topermissions?.chat?as well?@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.
@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)}, otherwiseUncaught (in promise) TypeError: Cannot read properties of undefined (reading 'chat')error will be reported.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.
@pekrockstar commented on GitHub (Oct 21, 2025):
yes,that change isn't necessary, If you have not customized other login methods, because the previous
auths.pycode does not have returnpermissionsfield, this should be the latest newly added field, THANKS ALL!