open-webui icon indicating copy to clipboard operation
open-webui copied to clipboard

feat: Restrict sharing to specific groups

Open taylorwilsdon opened this issue 2 weeks ago • 12 comments
trafficstars

Check Existing Issues

  • [x] I have searched all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Problem Description

When running an instance with a large user population, sharing can become extremely messy. We have restricted public sharing (a feature I also wrote for the same underlying reason haha) but users have effectively bypassed that control by sharing with large groups synced in from the IdP that result in their work-in-progress, limited value or otherwise not useful models, knowledge collections and such getting forced into user views and confusing folks.

Desired Solution you'd like

To resolve this, I propose implementing a new toggle for Allow Sharing to Group in the Edit Group modal that defaults to true (all groups shareable, maintains backwards compatibility) but allows an admin to toggle off so that the groups can remain in place and be shared to by admins where applicable but restricted from normal users leveraging to bypass the public sharing controls.

Alternatives Considered

Considered using a "group size" control (ie any group with more than 1000 users off limits) but I think this will be more effective and fits better with the current permission scheme.

Additional Context

No response

taylorwilsdon avatar Nov 03 '25 15:11 taylorwilsdon

Yes!

This effectively creates two types of groups

Groups intended for sharing stuff

Groups for permissions

And i love it

Has been discussed here also: https://github.com/open-webui/open-webui/discussions/16793

Classic298 avatar Nov 03 '25 15:11 Classic298

I've got it working @Classic298 in a nice clean way, PR incoming

taylorwilsdon avatar Nov 03 '25 15:11 taylorwilsdon

Accidentially closed this but https://github.com/open-webui/open-webui/pull/18888

taylorwilsdon avatar Nov 03 '25 15:11 taylorwilsdon

Yes!

This effectively creates two types of groups

Groups intended for sharing stuff

Groups for permissions

And i love it

Has been discussed here also: #16793

I think this is still rather a workaround for one specific issue with the current system, not a solution for the actual problem of permissions and sharing being mixed in the same system. As long as regular users or those with the respective permissions are not able to create and manage the groups for sharing (let's call it "teams") it doesn't help our case at all.

Ithanil avatar Nov 05 '25 12:11 Ithanil

@Ithanil is there a discussion for your specific feature? It would help if we can discuss it extensively and then we can propose a PR

Classic298 avatar Nov 05 '25 13:11 Classic298

@Ithanil I think described the issue and some of my ideas in the discussion of this PR: https://github.com/open-webui/open-webui/pull/13685 (I know, not the optimal place)

Ithanil avatar Nov 05 '25 13:11 Ithanil

GIGANTIC pr. I am sure you can achieve the same with much simpler code changes.

You wanna open a discussion for this? Otherwise this topic will not move.

Classic298 avatar Nov 05 '25 13:11 Classic298

GIGANTIC pr. I am sure you can achieve the same with much simpler code changes.

You wanna open a discussion for this? Otherwise this topic will not move.

Just to clarify, that's not my PR nor do I think it is the ideal solution. It just happened that a discussion took place there after the PR was rejected.

Otherwise, I was under the impression that https://github.com/open-webui/open-webui/discussions/16793 is the place to discuss this, instead of opening even more discussions. I can link my comments from the PR there.

Ithanil avatar Nov 05 '25 13:11 Ithanil

no, ideally we should have a good discussion on how we would want this feature actually implemented, logically, functionally and UI wise before we start developing it :)

Classic298 avatar Nov 05 '25 13:11 Classic298

Yes, but https://github.com/open-webui/open-webui/discussions/16793 is a discussion (yours in fact). Nonetheless, I just realized what I'm talking about is outside your set scope for that discussion. Will work on a new one on Friday.

Ithanil avatar Nov 05 '25 14:11 Ithanil

@Ithanil what we ideally want is https://github.com/open-webui/open-webui/issues/17858, this approach makes sense as an intermediary step.

tjbck avatar Nov 05 '25 17:11 tjbck

@Ithanil what we ideally want is #17858, this approach makes sense as an intermediary step.

I wholeheartedly agree, what we really want is "Teams" and Groups. The present idea/PR is totally fine, I just wanted to clarify with @Classic298 that is more of a workaround than a full solution.

Ithanil avatar Nov 05 '25 17:11 Ithanil