sync of local user deletes the local user
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 17
- Forks
- 19
- Avg merge
- 11h 40m
- Merged PRs (30d)
- 2
Description
Scenario: sync a local user
Given user "local-user" has been created with default attributes in the database user backend
When the administrator changes the display name of user "local-user" to "Test User" using the occ command
And LDAP user "local-user" is resynced
Then the command should have been successful
And user "local-user" should not exist
This scenario added in PR #506 looks a bit surprising to me. The test does the command:
occ user:sync OCA\User_LDAP\User_Proxy -u local-user -m remove
local-user is in the local user database, not in LDAP. So of course it is not found in LDAP. The admin has specified -m remove so the command removes the user. But the user is (and always was) just in the local database, they never came from LDAP in the first place.
If I was the admin then I would be a bit surprised that the user:sync command could ever delete a "real local user", even when I use -m remove. I feel like I should get an error message whenever the UID specified after -u is a "real local user". I should not be able to accidentally mess up a "real local user" with the user:sync command. I should have to explicitly do a user:delete if I want to delete a "real local user" (e.g. before then doing user:sync to sync the same UID that has just been added to LDAP)
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 with the sync scenario added in PR #506 and the occ user:sync OCA\User_LDAP\User_Proxy -u local-user -m remove command described here. Trace how a local database user is handled when the UID is absent from LDAP, then define completion as preventing accidental deletion of that local user while preserving the intended explicit deletion workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100