Skip to content

Store project shares and check project access #507

Closed

Description

@iamnbutler

Part of #506.

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

  1. added a commit that references this issue on Oct 19, 2026
    4527728
  2. added a commit that references this issue on Oct 19, 2026
    2ab6b35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions