{"record":{"id":"61c327161ac32885","repo":"zed-industries/zed","slug":"user-has-not-signed-the-zed-cla","errorCode":null,"errorMessage":"user has not signed the Zed CLA","messagePattern":"user has not signed the Zed CLA","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/collab/src/db/queries/rooms.rs","lineNumber":1203,"sourceCode":"        if let Some(channel) = channel {\n            let requires_zed_cla = channel.requires_zed_cla\n                || channel::Entity::find()\n                    .filter(\n                        channel::Column::Id\n                            .is_in(channel.ancestors())\n                            .and(channel::Column::RequiresZedCla.eq(true)),\n                    )\n                    .count(tx)\n                    .await?\n                    > 0;\n            if requires_zed_cla\n                && contributor::Entity::find()\n                    .filter(contributor::Column::UserId.eq(user_id))\n                    .one(tx)\n                    .await?\n                    .is_none()\n            {\n                Err(anyhow!(\"user has not signed the Zed CLA\"))?;\n            }\n        }\n        Ok(())\n    }\n\n    pub async fn connection_lost(&self, connection: ConnectionId) -> Result<()> {\n        self.transaction(|tx| async move {\n            self.room_connection_lost(connection, &tx).await?;\n            self.channel_buffer_connection_lost(connection, &tx).await?;\n            Ok(())\n        })\n        .await\n    }\n\n    pub async fn room_connection_lost(\n        &self,\n        connection: ConnectionId,\n        tx: &DatabaseTransaction,","sourceCodeStart":1185,"sourceCodeEnd":1221,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/collab/src/db/queries/rooms.rs#L1185-L1221","documentation":"check_user_has_signed_cla walks the channel and its ancestors for a requires_zed_cla flag; when set and no contributor record exists for the user, role elevation is refused. It enforces the Zed CLA requirement for privileged roles in CLA-gated channels.","triggerScenarios":"Thrown at crates/collab/src/db/queries/rooms.rs:1203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sign the Zed CLA associated with the user's GitHub account","Retry the role change once the contributor record is present"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}