Description
Bug Report
Problematic behavior
It's the second time a user gives me the following feedback:
When I visit a public document, I want it to be listed in my documents otherwise I can't find it the next time I come to Docs.
After investigating, it turns out that the users encountering this issue, were not connected when they visited the public document. In this case, the backend has not created the entry in the LinkTrace table because no user was logged-in...
Expected behavior/code
When a user visits a public Document as anonymous (happens a lot on federations that have a short lived session). We should be able to track the visit the next time the user logs in to Docs.
Steps to Reproduce
- Create a public document with user A
- Open a private browser session
- Visit the document without being logged-in
- Log-in with a user B
- The document is not listed on the home page. It should be.
Environment
- Impress version: 2.6.0
- Platform: Docker/k8s
Possible Solution
We can develop a solution without modifying the backend.
- When an anonymous user visits a public document, keep track of the visit in localstorage
- When a user logs-in, check the records in localstorage and make a get on each document after logging the user so that all visits are accounted for in the backend.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status