Skip to content

fix(restrictions): Apply the app config overwrite to the typed getters - #1664

Merged
CarlSchwan merged 2 commits into
nextcloud:mainfrom
solracsf:fix/appconfig-overwrite-typed-getters
Aug 21, 2026
Merged

fix(restrictions): Apply the app config overwrite to the typed getters#1664
CarlSchwan merged 2 commits into
nextcloud:mainfrom
solracsf:fix/appconfig-overwrite-typed-getters

Conversation

@solracsf

Copy link
Copy Markdown
Member

AppConfigOverwrite only overrode the deprecated getValue(). Server code has since moved to the typed getters, so the overwrite that lateSetupRestrictions() installs to force shareapi_only_share_with_group_members when "Hide other accounts from guests" is enabled was silently ignored by them.

Most notably OC\Collaboration\Collaborators\UserPlugin reads the option with getValueString(), so the share recipient autocompletion offered guests every account of the instance instead of only the members of their own groups. OCA\Guests\Config::isSharingRestrictedToGroup() reads it with getValueBool() and was equally unaffected by the overwrite.

@solracsf solracsf added bug Something isn't working 3. to review Waiting for reviews labels Aug 16, 2026
solracsf and others added 2 commits August 21, 2026 10:43
AppConfigOverwrite only overrode the deprecated getValue(). Server code
has since moved to the typed getters, so the overwrite that
lateSetupRestrictions() installs to force
`shareapi_only_share_with_group_members` when "Hide other accounts from
guests" is enabled was silently ignored by them.

Most notably OC\Collaboration\Collaborators\UserPlugin reads the option
with getValueString(), so the share recipient autocompletion offered
guests every account of the instance instead of only the members of
their own groups. OCA\Guests\Config::isSharingRestrictedToGroup() reads
it with getValueBool() and was equally unaffected by the overwrite.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the fix/appconfig-overwrite-typed-getters branch from e1cb047 to 4d53f9d Compare August 21, 2026 08:43
@CarlSchwan
CarlSchwan enabled auto-merge August 21, 2026 08:44
@CarlSchwan
CarlSchwan merged commit e9d2340 into nextcloud:main Aug 21, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants