Use different commit author for collab project clients (#24058)

Follow-up of https://github.com/zed-industries/zed/pull/23869

* Retrieves user + email for collab project clients and use these when
such users commit

Same as in https://github.com/zed-industries/zed/pull/23329, "is it the
right user name and e-mail" and "how to override these" questions apply.

* If this data is unavailable, forbid committing to the remote client

* Forbid running related actions in git panel, if committing/writing is
not permitted


Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-02-01 01:25:58 +02:00 committed by GitHub
parent 93c7b54caa
commit 9a6b9e3124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 182 additions and 50 deletions

View file

@ -532,6 +532,10 @@ impl Room {
&self.local_participant
}
pub fn local_participant_user(&self, cx: &App) -> Option<Arc<User>> {
self.user_store.read(cx).current_user()
}
pub fn remote_participants(&self) -> &BTreeMap<u64, RemoteParticipant> {
&self.remote_participants
}

View file

@ -588,6 +588,10 @@ impl Room {
&self.local_participant
}
pub fn local_participant_user(&self, cx: &App) -> Option<Arc<User>> {
self.user_store.read(cx).current_user()
}
pub fn remote_participants(&self) -> &BTreeMap<u64, RemoteParticipant> {
&self.remote_participants
}