Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: No UserChangedEvent emitted for LDAP users that are disable via markRemnantsAsDisabled config #46633

Open
5 of 8 tasks
blizzz opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 30-feedback bug feature: ldap

Comments

@blizzz
Copy link
Member

blizzz commented Jul 19, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Normally, when a user is being disabled or enabled, a UserChangedEvent is being emitted. There are listeners that consume this change. One example is the dav app, which updates the system addressbook and removes disabled users and re-add re-enabled users.

Now when the LDAP configuration's setting markRemnantsAsDisabled is set to 1 then all remnants users are reported as disabled, but the event is not being emitted at any time. And so components that act on stored information, like the system addressbook, do not have the information and still show that user in the contactsmenu.

Steps to reproduce

  1. Have an LDAP confguration
  2. Modify the config per cli (it is not exposed so far): occ ldap:set-config s01 markRemnantsAsDisabled 1
  3. Delete a users on LDAP
  4. Ensure the user is known as deleted: occ ldap:check-user $USERID
  5. In the web interface, look in the contacts menu for this user

Expected behavior

The user does not show up in the results

Installation method

None

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

Affected are 28-master

@blizzz blizzz added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: ldap 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 19, 2024
@blizzz
Copy link
Member Author

blizzz commented Jul 30, 2024

Latest idea: run triggerChange() from the private user instance on DeletedUsersIndex::markUser() and OfflineUser::unmark(), when the setting is enabled. Perhaps also register a background job to run this events when enabling this setting (and vice versa).

@blizzz blizzz self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 30-feedback bug feature: ldap
Projects
None yet
Development

No branches or pull requests

2 participants