owncloud / user_ldap

📒
GNU Affero General Public License v3.0
17 stars 17 forks source link

Provide a command similar to the reuse_account flag to remap ldap users #757

Open jvillafanez opened 2 years ago

jvillafanez commented 2 years ago

Ref https://github.com/owncloud/enterprise/issues/5449

Allow remaping the LDAP user if it's the only one possible. This could happen if the LDAP user has been moved AND the directory_uuid has also changed, but the target username is the same. The behavior should be similar than syncing the backend with the "reuse_account" flag, but in a more controlled way.

Note that this WON'T solve the collisions that could be happening. If 2 or more LDAP users could match the same username, the remap will be aborted.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 21 Code Smells

0.0% 0.0% Coverage
15.7% 15.7% Duplication

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 21 Code Smells

0.0% 0.0% Coverage
15.5% 15.5% Duplication

jvillafanez commented 1 year ago

Note that I've rebased the code and I had to fix things (https://github.com/owncloud/user_ldap/pull/757/commits/6bf21d818922737359a86f8bd20022db81e4a951). It should work, but consider the PR as untested due to the last commit.