Rename collaborator_logins to authorized_logins

Again, this is about reserving the concept of a "collaborator" for actual collaborators on a worktree.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo 2021-11-26 11:08:34 -07:00
parent cd2c3c3606
commit c8ad5b68e0
4 changed files with 33 additions and 30 deletions

View file

@ -848,13 +848,13 @@ impl LocalWorktree {
while let Some(status) = status.recv().await {
if let Some(this) = this.upgrade(&cx) {
let remote_id = if let client::Status::Connected { .. } = status {
let collaborator_logins = this.read_with(&cx, |this, _| {
let authorized_logins = this.read_with(&cx, |this, _| {
this.as_local().unwrap().config.collaborators.clone()
});
let response = rpc
.request(proto::OpenWorktree {
root_name: root_name.clone(),
collaborator_logins,
authorized_logins,
})
.await?;
@ -3316,7 +3316,7 @@ mod tests {
open_worktree.payload,
proto::OpenWorktree {
root_name: "the-dir".to_string(),
collaborator_logins: vec!["friend-1".to_string(), "friend-2".to_string()],
authorized_logins: vec!["friend-1".to_string(), "friend-2".to_string()],
}
);