nextcloud / announcementcenter

📢 Announcement Center for Nextcloud
https://apps.nextcloud.com/apps/announcementcenter
GNU Affero General Public License v3.0
39 stars 24 forks source link

Flag deleted users receiving announcement emails #701

Open MPStudyly opened 1 year ago

MPStudyly commented 1 year ago

Steps to reproduce

  1. Have users created by LDAP plugin and assigned to any LDAP group.
  2. Delete user from LDAP server, wait until they get flagged as "deleted" by Nextcloud.
  3. Create an announcement, targeting all users or at least the group the user was member of.

Expected behaviour

Deleted users, even if just pseudo deleted (i.e. flagged, as done by the LDAP backend) should not receive any email.

Actual behaviour

Deleted users, when just flagged as deleted get announcement emails.

Server configuration

If relevant for this issue, will provide it later.

Operating system: Ubuntu 22.04

Web server: Nginx

Database: Postgresql 14

PHP version: 8.1.23

Nextcloud version: (see Nextcloud admin page) Nextcloud 26.0.5

Where did you install Nextcloud from: Archive

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.18.0
  - admin_audit: 1.16.0
  - announcementcenter: 6.6.2
  - calendar: 4.4.4
  - calendar_resource_management: 0.5.0
  - checksum: 1.2.2
  - cloud_federation_api: 1.9.0
  - comments: 1.16.0
  - contacts: 5.3.2
  - contactsinteraction: 1.7.0
  - dav: 1.25.0
  - federatedfilesharing: 1.16.0
  - federation: 1.16.0
  - files: 1.21.1
  - files_downloadactivity: 1.16.0
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - firstrunwizard: 2.15.0
  - groupfolders: 14.0.4
  - holiday_calendars: 0.3.0
  - logreader: 2.11.0
  - lookup_server_connector: 1.14.0
  - metadata: 0.19.0
  - nextcloud_announcements: 1.15.0
  - notes: 4.8.1
  - notifications: 2.14.0
  - notify_push: 0.6.3
  - oauth2: 1.14.1
  - onlyoffice: 7.9.0
  - password_policy: 1.16.0
  - photos: 2.2.0
  - polls: 5.2.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - related_resources: 1.1.0
  - serverinfo: 1.16.0
  - settings: 1.8.0
  - sharebymail: 1.16.0
  - spreed: 16.0.5
  - support: 1.9.0
  - systemtags: 1.16.0
  - tasks: 0.15.0
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
  - twofactor_totp: 8.0.0
  - updatenotification: 1.16.0
  - user_ldap: 1.16.0
  - user_status: 1.6.0
  - viewer: 1.10.0
  - weather_status: 1.6.0
  - workflowengine: 2.8.0

Nextcloud configuration:

If relevant, will add later.

Are you using an external user-backend, if yes which one: LDAP

Client configuration

Browser: Firefox

Operating system: Ubuntu 22.04

Logs

If relevant, will add later.

nickvergessen commented 1 year ago

Are they marked as "disabled"? If not there is very little we can do about this.

MPStudyly commented 1 year ago

Are they marked as "disabled"? If not there is very little we can do about this.

Good question... I currently don't have any users in this state, so I can't tell for sure. But I guess they are not marked as such, as otherwise they should appear as such in the user management site. Would you suggest opening a ticket at the LDAP integration repo instead?

nickvergessen commented 1 year ago

Yeah, not sure. We use a method callForAllSeenUsers from the user manager, so the LDAP backend could change and not iterate over users that it plans to delete anyway.

MPStudyly commented 1 year ago

I think part of the issue is that over at the LDAP integration it was a design choice to not delete users on Nextcloud when deleted on the LDAP... While I see some valid reasons to do so, I don't know why they decided to put users in this special state, where Nextcloud itself does not show any hints about them but they are available via LDAP integration CLI.

MPStudyly commented 1 year ago

@nickvergessen sorry for the bump, is there anything that can/should be done in the announcements app, or should I bring this issue over to the LDAP integration?

nickvergessen commented 1 year ago

is there anything that can/should be done in the announcements app

No, because we can not know API wise if this is the case or not.

should I bring this issue over to the LDAP integration?

This