Make prompt library icon in context panel staff-only for now (#12457)

This is still pretty raw, so I'd like to hold off on shipping it to all
users.

Release Notes:

- Hide the prompt library for non-staff until it is in a more complete
state.
This commit is contained in:
Nathan Sobo 2024-05-29 16:53:45 -06:00 committed by GitHub
parent abec028e58
commit b8d9713b4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 56 additions and 34 deletions

View file

@ -192,10 +192,13 @@ impl UserStore {
cx.update(|cx| {
if let Some(info) = info {
cx.update_flags(info.staff, info.flags);
let disable_staff = std::env::var("ZED_DISABLE_STAFF")
.map_or(false, |v| v != "" && v != "0");
let staff = info.staff && !disable_staff;
cx.update_flags(staff, info.flags);
client.telemetry.set_authenticated_user_info(
Some(info.metrics_id.clone()),
info.staff,
staff,
)
}
})?;