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

Unable to reset Kobo sync for other users #2993

Open
deviantintegral opened this issue Jan 28, 2024 · 2 comments
Open

Unable to reset Kobo sync for other users #2993

deviantintegral opened this issue Jan 28, 2024 · 2 comments

Comments

@deviantintegral
Copy link

Describe the bug/problem

When logged in as an administrator, you can view other user profiles and interact with them. The Force full kobo sync button has a check against the currently logged in user, not the user profile that is being viewed:

count = ub.session.query(ub.KoboSyncedBooks).filter(current_user.id == ub.KoboSyncedBooks.user_id).delete()

To Reproduce

Steps to reproduce the behavior:

  1. Create a second user and set up Kobo syncing
  2. Browse their user profile as the first user, and click the Force full kobo sync button
  3. Note that it returns with 0 sync entries deleted

Expected behaviour

Admins should be able to reset sync for other users, or the button should be disabled with a message that you have to be logged in as that user to reset sync.

Environment (please complete the following information):

  • OS: Alpine / Docker
  • Python version: 3.x
  • Calibre-Web version: 0.6.21
  • Docker container: [LinuxServer]:
  • Browser: Firefox 123.0b3 (this isn't a browser specific bug)
@OzzieIsaacs
Copy link
Collaborator

Thanks for the detailed reporting

The newest nightly version should fix the problem.

@deviantintegral
Copy link
Author

Excellent, thank you!

OzzieIsaacs added a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants