issue: Even admin users cannot generate share links when chat sharing is disabled by default #5637

Closed
opened 2025-11-11 16:26:54 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @zolgear on GitHub (Jun 25, 2025).

Originally assigned to: @tjbck on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.15

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

Browser (if applicable)

Chrome 130.0.6683.2

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Admin users should always be able to generate shared chat links, even when the default permission disables chat sharing for normal users.

Actual Behavior

Admin users also get 401 Unauthorized error and cannot share chats.

Steps to Reproduce

  1. Go to Admin settings and set "Chat sharing" to disabled by default for new users.
  2. Log in as a user with the Admin role.
  3. Try to generate a shared chat link (e.g., via the "Share" button in the UI).
  4. Observe that an error 401 Unauthorized is returned, and link generation fails.

Logs & Screenshots

Request URL:
https://xxxx.xxxxxxx.com/api/v1/chats/----******/share
Request method:
POST
Status Code:
401 Unauthorized

Response: {
    "detail": "You do not have permission to access this resource. Please contact your administrator for assistance."
}  

Additional Information

When chat sharing is disabled by default in the permissions settings, even users with the Admin role cannot generate share links. This seems to be a bug, because administrators should be able to share chats regardless of default permission settings.

If any permission setting disables chat sharing, the restriction should not apply to Admins.

Originally created by @zolgear on GitHub (Jun 25, 2025). Originally assigned to: @tjbck on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.15 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### Browser (if applicable) Chrome 130.0.6683.2 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Admin users should always be able to generate shared chat links, even when the default permission disables chat sharing for normal users. ### Actual Behavior Admin users also get `401 Unauthorized` error and cannot share chats. ### Steps to Reproduce 1. Go to Admin settings and set "Chat sharing" to disabled by default for new users. 2. Log in as a user with the Admin role. 3. Try to generate a shared chat link (e.g., via the "Share" button in the UI). 4. Observe that an error `401 Unauthorized` is returned, and link generation fails. ### Logs & Screenshots Request URL: https://xxxx.xxxxxxx.com/api/v1/chats/*********-******-****-****-*********/share Request method: POST Status Code: 401 Unauthorized ``` Response: { "detail": "You do not have permission to access this resource. Please contact your administrator for assistance." } ``` ### Additional Information When chat sharing is disabled by default in the permissions settings, even users with the Admin role cannot generate share links. This seems to be a bug, because administrators should be able to share chats regardless of default permission settings. If any permission setting disables chat sharing, the restriction should not apply to Admins.
GiteaMirror added the bug label 2025-11-11 16:26:54 -06:00
Author
Owner

@zolgear commented on GitHub (Jul 16, 2025):

Fixed in v0.6.16.
Thanks!

@zolgear commented on GitHub (Jul 16, 2025): Fixed in v0.6.16. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5637