Description
Bug description
Deleted ldap account is not listed in disabled users with markRemnantsAsDisabled = 1
Steps to reproduce
- Have an LDAP confguration
- Modify the config per cli: occ ldap:set-config s01 markRemnantsAsDisabled 1
- Delete a users on LDAP
- Ensure the user is known as deleted: occ ldap:check-user $USERID
- Open the user management and select "disabled users"
Expected behavior
The user should appear there ;)
Nextcloud Server version
28
Additional info
- Weird implementation of the markRemnantsAsDisabled flag
server/apps/user_ldap/lib/User_Proxy.php
Lines 423 to 425 in f63ac94
It's possible to have more than one ldap backend. The above code seems to check if the first ldap connection have the flag set. It should take all backends into account.
Likely resolved by #46992.
- Wrong enable state for ldap remnants
stable28:
master:
The controller reads the disable state from the oc_preferences table. That does not take the disabled state for ldap remnants into account.
Apparently the users are returned by the endpoint, but filtered out by the frontend because they have enabled = true. Using $data['enabled'] = $targetUserObject->isEnabled();
makes it work. However there are some menu options, like enable user, that needs to be hidden for ldap remnants.