Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
73954f4a
Commit
73954f4a
authored
Aug 04, 2024
by
Jun Siang Cheah
Browse files
fix: admins viewing shared chats with ENABLE_ADMIN_CHAT_ACCESS set to false
parent
1bf042ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/webui/routers/chats.py
backend/apps/webui/routers/chats.py
+1
-1
No files found.
backend/apps/webui/routers/chats.py
View file @
73954f4a
...
@@ -186,7 +186,7 @@ async def get_shared_chat_by_id(share_id: str, user=Depends(get_verified_user)):
...
@@ -186,7 +186,7 @@ async def get_shared_chat_by_id(share_id: str, user=Depends(get_verified_user)):
status_code
=
status
.
HTTP_401_UNAUTHORIZED
,
detail
=
ERROR_MESSAGES
.
NOT_FOUND
status_code
=
status
.
HTTP_401_UNAUTHORIZED
,
detail
=
ERROR_MESSAGES
.
NOT_FOUND
)
)
if
user
.
role
==
"user"
:
if
user
.
role
==
"user"
or
(
user
.
role
==
"admin"
and
not
ENABLE_ADMIN_CHAT_ACCESS
)
:
chat
=
Chats
.
get_chat_by_share_id
(
share_id
)
chat
=
Chats
.
get_chat_by_share_id
(
share_id
)
elif
user
.
role
==
"admin"
and
ENABLE_ADMIN_CHAT_ACCESS
:
elif
user
.
role
==
"admin"
and
ENABLE_ADMIN_CHAT_ACCESS
:
chat
=
Chats
.
get_chat_by_id
(
share_id
)
chat
=
Chats
.
get_chat_by_id
(
share_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment