Day 38 10 min
A permissions system
1 / 6 · ≈ 15 min left
The problem
Lina is a designer at a company that uses a project tool. She is in the team "Brand", which is inside the team "Marketing". Marketing can edit the project "Spring launch". Lina opens a file in that project and clicks Edit.
Before the editor opens, the tool has to answer one question: can Lina edit this file? The answer depends on the file, its project, two nested teams and her company’s admin list.
Every API call asks that question, often several times. If one answer takes 20 ms, a page that lists 50 files takes a second just for permissions.