-
Notifications
You must be signed in to change notification settings - Fork 159
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
public links do not work in private/incognito windows #1882
Comments
the problem seems not to be a private session but a session where there hasn't been an phoenix authentication before. #1900 hasn't changed anything in that problem |
we should investigate this as it could hide more issues |
reproduced locally while attempting to write public link tests without going through the auth pages |
raising to p2. this means people who never had an OC account and are trying to open a public link will see this error |
This is related to capabilities. We need to make sure that any code that relies on capabilities can still work even when they are not loaded. |
Fix is here: #2110 |
This also tells me that capabilities are likely still stored somewhere after a user has logged out. |
From what I see the current user object is stored in localStorage, including capabilities. And when we log out, we do reset all user vars to something like false or null, but the capabilities are staying untouched and uncleared. |
capabilities are reset here - at least in theory |
@DeepDiver1975 from what I'm currently seeing, the capabilities are also present in the user object. I could also try rewiring SET_CAPABILITIES to also commit to the user object. |
additional note: @DeepDiver1975 what you pointed at does work temporarily, but as soon as the vuex-persist restores the state from localStorage where the |
okay, now I understand. now the question is why vuex-persist is not persisting |
I tried a little hack where I clear capabilities and version within the "SET_USER" call and it works now. Another try: I have swapped SET_CAPABILITIES and SET_USER and now it works ?! To analyze further, I added a dummy attribute in the state. If I set said property in SET_USER, its value is persisted in localStorage. However if I set another value for dummy in SET_CAPABILITIES, it does not get persisted to localStorage. This tells me that somehow vuex-persist only triggers for SET_USER but not for SET_CAPABILITIES. Might need to read more about vuex-persist to find out why it's only persisting the first one. |
and found it... there is a filter indeed for vuex-persist... I'll make a PR. |
Fix for properly clearing capabilities is here: #2116 |
Steps to reproduce
Expected behaviour
files / folders should be listed
Actual behaviour
empty file-list
Logs
Browser log (FF)
Browser log (Chrome)
The text was updated successfully, but these errors were encountered: