3 ms·
I really appreciate that this includes details about how search permissions work - how they ensure that search results include data from my private repos. I'd
by simonw 4y ago
I really appreciate that this includes details about how search permissions work - how they ensure that search results include data from my private repos.
I'd always wondered how they implemented that: it turns out they add extra internal filters to their searches along the lines of "RepoIDs(...) or PublicRepo".
Question for the team: Do you have an additional permission check in the view layer before the results are shown to the end-user? I worry that if I switch a repo from public to private it may take a while for the code search index to catch up to the new permissions.
- tclem 4y agoYes, we never fully trust the search index so before anything is displayed to the user there are a number of final checks performed to make sure you're actually allowed to see that content. Another fun example is that your SSO session might have expired. While you technically have access to view the result, we can't show it until you go through the refresh dance to get another valid token.