YunoHost-Apps / calibreweb_ynh

Calibre-web package for YunoHost
GNU General Public License v3.0
18 stars 8 forks source link

Automatically sync users on modification #138

Open supermamie opened 7 months ago

supermamie commented 7 months ago

Describe the bug

When a user is updated in YunoHost, a manual action is needed in Calibre.

Context

Steps to reproduce

  1. Update the password of a user from the admin interface
  2. Try to log in Calibre with this new password
  3. fail
  4. Log in Calibre with an admin user
  5. Click on « Import from LDAP » in the admin view
  6. Now the new password works

Expected behavior

The LDAP synchro should be automatic when a user is modified

Krakinou commented 7 months ago

When you say "Update the password of a user from the admin interface", you mean in Yunohost admin interface or calibreweb?

thardev commented 7 months ago

Hi all 🙂

I've had the same issue after creation of new users on my instance. I think this could be solved with a post_user_create hook similar to the already existing post_user_delete. Sadly, I'm not aware if there is a hook after a user is modified, so maybe is out of the scope for this issue, I could create a separate one if needed and I'm also happy to provide the hook on a PR.

Krakinou commented 7 months ago

This is a different issue : although the hook exists on the Yunohost side, triggering the correct function to create the same user on the calibreweb side is not a trivial issue. This is not just about adding a new entry in the database. I planned to work on this someday, but I never get the time to do it : PR are welcome if you know how to do it.

Krakinou commented 7 months ago

@supermamie : I tried to reproduce the issue but did not succeed. 1/Calibreweb is set as public (accessible to the visitor group) 2/Change the password of an existing user 3/Try to connect to calibreweb with the new password : work. Can you please provide more info on the issue you're encountering?