shiori icon indicating copy to clipboard operation
shiori copied to clipboard

Cannot unset "Make archive publicly available" once it has been saved with true

Open ishults opened this issue 11 months ago • 1 comments

Data

  • 1.5.5:
  • MariaDb:
  • Ubuntu 22.04:
  • Docker Compose:

Describe the bug / actual behavior

If you check "Make archive publicly available" and then go back and uncheck it, the unchecked value (public = false) does not save, and the link remains public.

Expected behavior

A clear and concise description of what you expected to happen.

To Reproduce

  1. (Not sure if this step is critical) - Go to settings and ensure "Make archive publicly available by default" is unchecked
  2. Select any existing archive and check "Make archive publicly available"
  3. Click "OK"
  4. In another browser/session, visit the public URL and ensure you can view the page.
  5. Go back to your admin session and uncheck "Make archive publicly available" for that website.
  6. Refresh the page.
  7. Edit the archive again and notice that "Make archive publicly available" is still checked.
  8. In another browser/session, note that you can still visit the URL.

Screenshots

Notes

It looks like the UI is still sending "public: "1"" to the API even when the box is unchecked. I wonder if there's a falsey-check failing somewhere.

ishults avatar Aug 31 '23 15:08 ishults