VEuPathDB / web-study-data-access

Utilities and hooks for controlling end user access to study data
Apache License 2.0
0 stars 1 forks source link

Fix 21 #22

Closed dmfalke closed 2 years ago

dmfalke commented 2 years ago

Fixes #21.

User datasets can be installed in the database at any point of a user's website session. Since we don't have a dedicated way to detect such events, this PR introduces a way to break the memoization cache such that we always request updated permissions from the backend. I opted not to remove the memoization itself with the thought that we might be able to leverage the WDK user service client module in some way to detect installed user datasets, and once again take advantage of memoization. A more robust fix might be to use a different approach to prevent multiple calls to the permissions endpoint, or to simply remove memoization. Since this is a somewhat urgent issue, I opted for a solution that introduces the least change. I will open an issue to explore this in a more robust way.

dmfalke commented 2 years ago

Since this is urgent, I merged this without review