Thinking about this more, RemoteRepository should not be a mapping of user access to remote repository objects, but instead should be just a list of accumulated remote repository objects. There should be a secondary table that provides a many to many mapping between remote users and remote repository objects. This lets us associate a project to a GitHub repo, for example, and multiple users would get access to the project on our side.
Thinking about this more,
RemoteRepositoryshould not be a mapping of user access to remote repository objects, but instead should be just a list of accumulated remote repository objects. There should be a secondary table that provides a many to many mapping between remote users and remote repository objects. This lets us associate a project to a GitHub repo, for example, and multiple users would get access to the project on our side.