You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Store project shares and check project access #507
Add the data model and the one check every enforcement point uses.
The directory stores shares per projectId: whether the whole team has access, and which people do, keyed by Tailscale login and showing the GitHub login, with who granted each share and when. The Directory object's schema version is bumped (version key) and a migration is added.
access(person, project) in apps/host:
Gives direct access for a local folder (the checkoutId host is the person's own) or for GitHub read access to the repository.
Grants access when the project is shared with the team or with the person.
GitHub read access is checked by the host doing the enforcing, with its owner's gh token, for the caller's GitHub login. The result is cached with a short TTL.
Verify which endpoint works when the caller can only read the repository, for example GET /repos/{o}/{r}/collaborators/{user}/permission.
Decide what to do when the host isn't signed in to gh: refuse, to fail closed.
Only people with direct access can change shares. Hosts check this before writing to the directory.
Ops: project-share to share with the team, share with a person, or unshare; and project-access to list who has access and why.
Activity
feat(host): check project access and refuse peers without it
feat(host): check project access and refuse peers without it (#523)