shiori
shiori copied to clipboard
Cannot unset "Make archive publicly available" once it has been saved with true
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
- (Not sure if this step is critical) - Go to settings and ensure "Make archive publicly available by default" is unchecked
- Select any existing archive and check "Make archive publicly available"
- Click "OK"
- In another browser/session, visit the public URL and ensure you can view the page.
- Go back to your admin session and uncheck "Make archive publicly available" for that website.
- Refresh the page.
- Edit the archive again and notice that "Make archive publicly available" is still checked.
- 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.
After investigating this a bit, this may be caused by the asynchronous way we handle the archives, if we change the bookmark in a quick succession after adding it this line will overwrite changes with the values we used when we first added it.