diff --git a/src/lumina/schema/member.py b/src/lumina/schema/member.py index c68adee..d111d88 100644 --- a/src/lumina/schema/member.py +++ b/src/lumina/schema/member.py @@ -56,6 +56,7 @@ class MemberPrivateResponse(LuminaModel): year_of_graduation: int | None consent: MemberConsent anonymous_ids: list[UUID] | None + is_admin: bool = False @classmethod def from_model(cls, model: MemberModel): @@ -71,6 +72,7 @@ def from_model(cls, model: MemberModel): if model.consent else MemberConsent.get_no_consent(), anonymous_ids=model.anonymous_ids, + is_admin=model.is_admin, ) diff --git a/tests/unit/lumina/endpoints/__snapshots__/test_member.ambr b/tests/unit/lumina/endpoints/__snapshots__/test_member.ambr index b722574..31bb862 100644 --- a/tests/unit/lumina/endpoints/__snapshots__/test_member.ambr +++ b/tests/unit/lumina/endpoints/__snapshots__/test_member.ambr @@ -14,6 +14,7 @@ 'emailVerified': False, 'emailVerifiedAt': None, 'id': 'fred_bloggs', + 'isAdmin': False, 'phone': None, 'yearOfGraduation': None, }), @@ -30,6 +31,7 @@ 'emailVerified': False, 'emailVerifiedAt': None, 'id': 'alice_bloggs', + 'isAdmin': False, 'phone': None, 'yearOfGraduation': None, }), @@ -49,6 +51,7 @@ 'emailVerified': True, 'emailVerifiedAt': '2021-01-01T00:00:00', 'id': 'fred_bloggs', + 'isAdmin': False, 'phone': None, 'yearOfGraduation': None, }) @@ -69,6 +72,7 @@ 'emailVerified': True, 'emailVerifiedAt': '2021-01-01T00:00:00', 'id': 'fred_bloggs', + 'isAdmin': False, 'phone': None, 'yearOfGraduation': None, }) @@ -87,6 +91,7 @@ 'emailVerified': True, 'emailVerifiedAt': '2021-01-01T00:00:00', 'id': 'fred_bloggs', + 'isAdmin': False, 'phone': None, 'yearOfGraduation': None, })