use serde::{Deserialize, Serialize}; /// Authentication state returned by the `check_auth` server function. /// /// When no valid session exists, `authenticated` is `false` and all /// other fields are empty strings. #[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq)] pub struct AuthInfo { pub authenticated: bool, pub sub: String, pub email: String, pub name: String, pub avatar_url: String, /// The link back to the platform portal (the workspace's dashboard /// there); empty when no portal is configured. #[serde(default)] pub portal_url: String, /// The docs site this deployment links to from the sidebar. #[serde(default)] pub docs_url: String, /// Holds a BreakPilot support role, so may open any tenant. #[serde(default)] pub staff: bool, /// The customer tenant support has opened; `None` for everyone else and /// for support before choosing one. #[serde(default)] pub support_tenant: Option, /// What the user's org roles allow in Prüfwerk; decides whether the /// app shows at all and whether write actions show. The agent enforces /// the same rule on every request. #[serde(default)] pub access: crate::ProductAccess, /// The workspace blocked or removed this member (portal#74): the app /// shows only that, whatever the role allows. #[serde(default)] pub member_blocked: bool, } /// A customer tenant opened by BreakPilot support. #[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)] pub struct SupportTenant { /// The registry's tenant id, sent to the agent with every request. pub id: String, pub slug: String, pub name: String, }