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

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

Open
ishults opened this issue Aug 31, 2023 · 1 comment
Labels
type:bug Something isn't working

Comments

@ishults
Copy link

ishults commented Aug 31, 2023

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 ishults added the type:bug Something isn't working label Aug 31, 2023
@fmartingr
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants