Skip to content

Commit 15e32e9

Browse files
[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>
1 parent 7c2bd3f commit 15e32e9

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
797797
oauthProviders: crud.oauth_providers,
798798
passkeyAuthEnabled: crud.passkey_auth_enabled,
799799
isMultiFactorRequired: crud.requires_totp_mfa,
800+
isAnonymous: crud.is_anonymous,
800801
toClientJson(): CurrentUserCrud['Client']['Read'] {
801802
return crud;
802803
}

packages/template/src/lib/stack-app/users/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export type BaseUser = {
147147
readonly passkeyAuthEnabled: boolean,
148148

149149
readonly isMultiFactorRequired: boolean,
150+
readonly isAnonymous: boolean,
150151
toClientJson(): CurrentUserCrud["Client"]["Read"],
151152

152153
/**

0 commit comments

Comments
 (0)