janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.01k stars 1.28k forks source link

Visibility restriction based on custom column always hides books unless explicitly allowed by value #2989

Open Winzum opened 5 months ago

Winzum commented 5 months ago

Describe the bug/problem

when selecting a custom column in the option View Restrictions based on Calibre column under the UI configuration, all books are hidden for the user, unless a value is explicitly allowed in the user settings. this makes the deny value option under the profile settings essentially useless. I would expect there to be an option to show the library and hide certain books based on if a value is found.

If I now upload a book in calibre-web as an admin, it will not be visible to me, as the custom column is not filled in yet.

To Reproduce

Steps to reproduce the behavior:

  1. Go to admin dashboard
  2. Go to UI Configuration -> View configuration
  3. View Restrictions based on Calibre column -> select custom column configured in calibre
  4. navigate to library
  5. all books should now be hidden for the user
  6. navigate to current user's profile
  7. Select Allowed/Denied Custom Column Values of User
  8. add values that are expected in the custom column and set to allow
  9. library should be visible again
  10. try to upload a new book
  11. error message "Oops! Selected book is unavailable. File does not exist or is not accessible" because custom column is not filled in yet

Expected behavior Books not to be hidden when the custom column is still empty.

Environment (please complete the following information):