feat: [OCISDEV-949] add option to disable direct (user/group) sharing#651
Merged
Conversation
Adds an `enable_user_sharing` config option to the ocs, usershareprovider and ocmshareprovider services. Defaults to true. When set to false, the usershareprovider and ocmshareprovider gRPC services reject requests to share a resource with a user, group, or federated (remote) user. The sharees search endpoint returns no results, and the files_sharing.user.enabled capability is set to false. Public link sharing is not affected.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
93d8380 to
e5f68ae
Compare
kobergj
previously requested changes
Jul 9, 2026
kobergj
left a comment
Collaborator
There was a problem hiding this comment.
Just one point. Rest looks good 👍
mklos-kw
reviewed
Jul 9, 2026
mklos-kw
reviewed
Jul 9, 2026
643be4e to
91ad80f
Compare
Adds an enable_public_sharing config option to the publicshareprovider service, defaulting to true. When set to false, creating new public links is rejected (internal links, which carry no permissions, are unaffected). Also removes a hardcoded override in the capabilities handler that always forced files_sharing.public.enabled to true, letting it reflect whatever value is actually configured.
91ad80f to
ab1424c
Compare
2403905
approved these changes
Jul 9, 2026
mklos-kw
approved these changes
Jul 9, 2026
9 tasks
mzner
added a commit
to owncloud/ocis
that referenced
this pull request
Jul 9, 2026
…e6f7f Includes owncloud/reva#651, which adds the enable_user_sharing and enable_public_sharing config options this feature depends on.
mzner
added a commit
to owncloud/ocis
that referenced
this pull request
Jul 10, 2026
…e6f7f Includes owncloud/reva#651, which adds the enable_user_sharing and enable_public_sharing config options this feature depends on.
2403905
pushed a commit
to owncloud/ocis
that referenced
this pull request
Jul 10, 2026
* build(deps): [OCISDEV-949] bump reva to v2.0.0-20260709150645-a9d5432e6f7f Includes owncloud/reva#651, which adds the enable_user_sharing and enable_public_sharing config options this feature depends on. * feat: [OCISDEV-949] add options to disable direct and public sharing Adds two independent, per-deployment config options: - OCIS_ENABLE_USER_SHARING (default true), read by the frontend, graph, sharing and ocm services. When false, creating new user, group or federated shares is rejected (via reva's usershareprovider and ocmshareprovider, and via the graph Invite endpoint for the modern web client), the legacy sharees search endpoint returns no results, and the files_sharing.user.enabled / user_enumeration.enabled capabilities report false so the web UI hides the "share with people" search. Space membership invites are exempt. - OCIS_ENABLE_PUBLIC_SHARING (default true), read by the frontend and sharing services. When false, creating new public links is rejected via reva's publicshareprovider, and files_sharing.public.enabled reports false so the web UI hides public link creation. The two settings are fully independent of each other.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
enable_user_sharingconfig option to theocs,usershareproviderandocmshareproviderservices. Defaults totrue.When set to
false:usershareprovider.CreateShareandocmshareprovider.CreateOCMSharerejectrequests to share a resource with a user, group, or federated (remote) user.
Public link sharing is not affected.
/apps/files_sharing/api/v1/shareessearch endpoint returns anempty result set instead of searching users/groups.
files_sharing.user.enabledcapability is set tofalse, so clientscan hide the corresponding UI.
This is consumed by a corresponding oCIS change that wires the new option to
an
OCIS_ENABLE_USER_SHARINGconfig toggle.