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

Reload layer in incognito fails #5734

Closed
normanrz opened this issue Sep 17, 2021 · 2 comments · Fixed by #6380
Closed

Reload layer in incognito fails #5734

normanrz opened this issue Sep 17, 2021 · 2 comments · Fixed by #6380

Comments

@normanrz
Copy link
Member

Expected Behavior

Probably, the button shouldn't be available for non-authorized users.

Current Behavior

It fails with unhelpful error messages.
Screenshot 2021-09-17 at 16 19 46

Steps to Reproduce the bug

I was clicking the "reload" button on the color layer in this dataset: https://webknossos.org/datasets/scalable_minds/l4dense_motta_et_al_demo/view

@fm3
Copy link
Member

fm3 commented Jul 29, 2022

Came across this again. Since the button clears the caches on the server, this action currently considered “administration” of the dataset, not “read”. We could now

(1) Allow this for any user, since it cannot do much harm, except cause extra load and decrease perf for all
(2) Soften the behavior of the button in the front-end, if the user does not have administration right for the dataset, to only reload the data from the backend, but not call the clear-caches route
(3) Hide the button entirely if the user does not have administration rights for the dataset

Any opinions? cc @philippotto

@philippotto
Copy link
Member

Hm, initially, I was about to say (2), but I'm not really sure what the use case for unauthorized users is in general. They probably didn't change the dataset on the server. Therefore, (3) seems reasonable to me.

Alternatively, one could do (1) and combine it with a back-end sleep of a few seconds to do some cheapo rate limiting. However, I still don't really see a good use case for unregistered users. So, let's do (3) if nobody disagrees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants