Skip to content

fix(sharing): omit groups from share placeholder when group sharing disabled - #9053

Open
whoalin1 wants to merge 2 commits into
nextcloud:mainfrom
whoalin1:fix/hide-groups-share-placeholder-when-disabled
Open

whoalin1 wants to merge 2 commits into
nextcloud:mainfrom
whoalin1:fix/hide-groups-share-placeholder-when-disabled

Conversation

@whoalin1

@whoalin1 whoalin1 commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

When an admin disables group sharing (core / shareapi_allow_group_sharing), the calendar share search still said “Share with users or groups”.

Expose that config via calendar initial state, load it into the settings store (same path as other server settings), and omit “groups” from the share search placeholder / empty state when the flag is false. Group principals are also filtered out of DAV sharee results in that case.

Closes #2946

Test plan

  • Admin → Sharing → disable “Allow sharing with groups”
  • Open Calendar → share a calendar → placeholder is “Share with users” (no “groups”); empty state is “No users”
  • Re-enable group sharing → placeholder returns to “Share with users or groups”; groups appear in search again
  • PHP: tests/php/unit/Service/CalendarInitialStateServiceTest.php
  • JS: tests/javascript/unit/store/settings.test.js

AI disclosure

This PR was drafted with the help of AI coding assistants (Cursor agents / LLM-based tools), including the description. I am responsible for it and happy to rework anything that doesn't fit.

All commits carry an Assisted-by: Cursor:grok-4.7 trailer.

@GVodyanov GVodyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for the PR. I think u can use the share manager for this
$allowGroupSharing = $this->shareManager->allowGroupSharing();

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…isabled

Assisted-by: Cursor:grok-4.7
Signed-off-by: whoalin1 <whoalin414@gmail.com>
@whoalin1
whoalin1 force-pushed the fix/hide-groups-share-placeholder-when-disabled branch from 2a0d1f7 to 5b1448e Compare October 9, 2026 14:12
Assisted-by: Cursor:grok-4.7
Signed-off-by: whoalin1 <207920491+whoalin1@users.noreply.github.com>
@whoalin1

whoalin1 commented Oct 9, 2026

Copy link
Copy Markdown
Author

@GVodyanov good call, switched to IManager::allowGroupSharing().

AI disclosure: this reply was drafted with help from an AI assistant.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't show groups in share placeholder if group sharing is disabled

3 participants