[Bug]: Activities generated for calendar shared with group but unshared individually
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
In the daily activity summary email I get notifications about a shared calendar that I have unshared for myself with the "unshare for me" button in the calendar app.
The calendar is shared by another user to a group, that contains myself.
Probably this code should filter out the unshared calendars:
https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/Activity/Backend.php#L616-L621
Similar to what is done here:
https://github.com/nextcloud/server/blob/b24a917d4370d09ff810bbcf42b60508b54fb7f4/apps/dav/lib/DAV/Sharing/SharingMapper.php#L28
Steps to reproduce
- User A: Share a calendar with a group that contains user B
- User B: enable calendar activity email notifications
- User B: Do "unshare for me" on the shared calendar
- User A: Create an event in the calendar
- User B gets an email notification, despite having unshared the calendar.
Expected behavior
When unsharing a calendar, that is shared to a group, no activity emails should be received from that calendar.
Nextcloud Server version
30
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloud.mydomain.ch",
"werkzeug.mydomain.ch"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.2.2",
"overwrite.cli.url": "https:\/\/cloud.mydomain.ch",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"maintenance": false,
"theme": "",
"loglevel": 1,
"updater.release.channel": "stable",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"social_login_auto_redirect": true,
"htaccess.RewriteBase": "\/",
"simpleSignUpLink.shown": false,
"default_phone_region": "CH",
"skeletondirectory": "",
"templatedirectory": "",
"defaultapp": "files,calendar",
"app_install_overwrite": [
"extract",
"impersonate",
"talk_matterbridge",
"issuetemplate",
"keeweb"
],
"memcache.local": "\\OC\\Memcache\\APCu"
}
}
List of activated Apps
Enabled:
- activity: 3.0.0
- announcementcenter: 7.0.1
- app_api: 4.0.0
- calendar: 5.0.5
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contacts: 6.1.1
- dashboard: 7.10.0
- dav: 1.31.1
- deck: 1.14.2
- drawio: 3.0.3
- external: 5.5.2
- federatedfilesharing: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_fulltextsearch: 30.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- forms: 4.3.3
- fulltextsearch: 30.0.0
- group_everyone: 0.1.16
- groupfolders: 18.0.5
- impersonate: 1.17.0
- integration_google: 3.1.0
- keeweb: 0.6.20
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- mail: 4.0.3
- notifications: 3.0.0
- oauth2: 1.18.1
- photos: 3.0.2
- polls: 7.2.5
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- richdocuments: 8.5.2
- settings: 1.13.0
- sociallogin: 5.7.0
- tables: 0.8.1
- tasks: 0.16.1
- text: 4.1.0
- theming: 2.5.0
- timemanager: 0.3.16
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_status: 1.10.0
- viewer: 3.0.0
- webapppassword: 24.9.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0 (installed 1.9.0)
- appointments: 2.3.1 (installed 2.3.1)
- assistant: 2.1.1 (installed 2.1.1)
- backup: 1.4.0 (installed 1.4.0)
- bruteforcesettings: 3.0.0 (installed 1.6.0)
- collectives: 2.15.1 (installed 2.15.1)
- contactsinteraction: 1.11.0 (installed 1.0.0)
- documentserver_community: 0.1.20 (installed 0.1.20)
- emlviewer: 1.0.11 (installed 1.0.11)
- encryption: 2.18.0
- extract: 1.3.6 (installed 1.3.6)
- federation: 1.20.0 (installed 1.9.0)
- files_external: 1.22.0 (installed 1.20.0)
- files_mindmap: 0.0.30 (installed 0.0.30)
- files_rightclick: 0.15.1 (installed 1.6.0)
- firstrunwizard: 3.0.0 (installed 2.8.0)
- fulltextsearch_elasticsearch: 30.0.0 (installed 30.0.0)
- integration_whiteboard: 0.0.14 (installed 0.0.14)
- maps: 1.5.0 (installed 1.5.0)
- nextcloud_announcements: 2.0.0 (installed 1.14.0)
- onlyoffice: 9.5.0 (installed 9.5.0)
- password_policy: 2.0.0 (installed 1.9.1)
- passwords: 2024.11.20 (installed 2024.11.20)
- serverinfo: 2.0.0 (installed 1.9.0)
- sharebymail: 1.20.0 (installed 1.19.0)
- snappymail: 2.38.2 (installed 2.38.2)
- spreed: 20.0.2 (installed 20.0.2)
- support: 2.0.0 (installed 1.2.1)
- survey_client: 2.0.0 (installed 1.7.0)
- suspicious_login: 8.0.0
- systemtags: 1.20.0 (installed 1.9.0)
- talk_matterbridge: 1.26.0 (installed 1.26.0)
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0 (installed 1.7.0)
- weather_status: 1.10.0 (installed 1.1.0)
Nextcloud Signing status
Nextcloud Logs
Additional info
Additional User Backend: Social Login
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading apps/dav/lib/CalDAV/Activity/Backend.php around lines 616-621 and compare the filtering in apps/dav/lib/DAV/Sharing/SharingMapper.php around line 28. Reproduce the group-shared calendar and “unshare for me” steps, then verify that creating an event no longer generates an activity email for the unshared calendar.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100