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:
parent
a0895a6ed8
commit
161f6dfcb6
2 changed files with 44 additions and 15 deletions
|
@ -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?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue