[DEVIN: Konsti] Add isAnonymous to BaseUser interface and implementation (#577)

Add isAnonymous property to the user object that is returned by the
functions in stack-app.

The User CRUD type already has is_anonymous, this PR adds it to the
BaseUser interface and updates the _createBaseUser method to include it.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
This commit is contained in:
devin-ai-integration[bot] 2025-04-04 02:39:45 +00:00 committed by GitHub
parent 7c2bd3f701
commit 15e32e9e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -797,6 +797,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
oauthProviders: crud.oauth_providers,
passkeyAuthEnabled: crud.passkey_auth_enabled,
isMultiFactorRequired: crud.requires_totp_mfa,
isAnonymous: crud.is_anonymous,
toClientJson(): CurrentUserCrud['Client']['Read'] {
return crud;
}

View File

@ -147,6 +147,7 @@ export type BaseUser = {
readonly passkeyAuthEnabled: boolean,
readonly isMultiFactorRequired: boolean,
readonly isAnonymous: boolean,
toClientJson(): CurrentUserCrud["Client"]["Read"],
/**