collab: Set billing-related fields for Zed staff (#29887)

This PR sets the billing-related fields in the LLM token claims for Zed
staff.

Staff members are automatically in the Zed Pro plan with a subscription
periods that spans the entirety of each month.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-04 17:00:34 -04:00 committed by GitHub
parent a0895a6ed8
commit 161f6dfcb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 44 additions and 15 deletions

View file

@ -180,6 +180,10 @@ impl Session {
}
pub async fn current_plan(&self, db: &MutexGuard<'_, DbHandle>) -> anyhow::Result<proto::Plan> {
if self.is_staff() {
return Ok(proto::Plan::ZedPro);
}
let user_id = self.user_id();
let subscription = db.get_active_billing_subscription(user_id).await?;