Describe the bug
OpenCloud sends space-share notification emails to disabled users. This occurs both when a space is shared directly with a disabled user and when it is shared with a group containing a disabled member.
Steps to reproduce
The following was reproduced locally with the existing acceptance-test stack and Inbucket as the SMTP sink.
- Start
opencloudeu/opencloud-rolling:7.5.0 with the notifications service and SMTP delivery to Inbucket.
- Create a disposable space owned by Alice.
- For the direct-share case, disable Brian through the Graph API and share the space directly with Brian.
- For the group-share case, create a group containing Brian and active Carol, disable Brian through the Graph API, and share the space with the group.
- Check the Inbucket mailboxes.
Expected behavior
Disabled users should not receive space-share notification emails. Active members of a shared group should continue to receive them.
Actual behavior
Both share operations returned HTTP 200, but Brian's Inbucket mailbox contained one email although no email was expected. In the group-share case, active Carol also received her notification. The behavior was reproduced with both direct and group shares on 7.5.0.
Setup
- Server image:
opencloudeu/opencloud-rolling:7.5.0
- Acceptance runner: local
woodpecker-cli exec on Rancher Desktop Moby
- Mail sink:
inbucket/inbucket:latest, SMTP on email:2500, API on email:9000
- Storage driver: posix
Source trace
The observed direct-share path is:
Graph API direct share
-> SpaceShared event
-> notifications: handleSpaceShared()
-> ensureGranteeList() / getGranteeList()
-> direct grantee: disableEmails() check
-> GetUser() returns the CS3 user object
-> missing-email check
-> render and send the email to Brian's address
The observed group-share path is:
Graph API group share
-> SpaceShared event
-> notifications: handleSpaceShared()
-> ensureGranteeList() / getGranteeList()
-> GetGroup() and iterate all group members
-> filter executant and notification opt-out
-> GetUser() returns the CS3 user object
-> missing-email check
-> render and send the email to Brian's address
In the v7.5.0 source, getGranteeList() has no account-state filter for expanded group members (services/notifications/pkg/service/service.go:200-249). The CS3 user object used by GetUser() contains identity and mail fields but no AccountEnabled field. The Graph/LDAP model maps account state separately.
🤖 drafted with OpenAI Codex, reviewed before submitting.
Describe the bug
OpenCloud sends space-share notification emails to disabled users. This occurs both when a space is shared directly with a disabled user and when it is shared with a group containing a disabled member.
Steps to reproduce
The following was reproduced locally with the existing acceptance-test stack and Inbucket as the SMTP sink.
opencloudeu/opencloud-rolling:7.5.0with the notifications service and SMTP delivery to Inbucket.Expected behavior
Disabled users should not receive space-share notification emails. Active members of a shared group should continue to receive them.
Actual behavior
Both share operations returned HTTP 200, but Brian's Inbucket mailbox contained one email although no email was expected. In the group-share case, active Carol also received her notification. The behavior was reproduced with both direct and group shares on
7.5.0.Setup
opencloudeu/opencloud-rolling:7.5.0woodpecker-cli execon Rancher Desktop Mobyinbucket/inbucket:latest, SMTP onemail:2500, API onemail:9000Source trace
The observed direct-share path is:
The observed group-share path is:
In the
v7.5.0source,getGranteeList()has no account-state filter for expanded group members (services/notifications/pkg/service/service.go:200-249). The CS3 user object used byGetUser()contains identity and mail fields but noAccountEnabledfield. The Graph/LDAP model maps account state separately.🤖 drafted with OpenAI Codex, reviewed before submitting.