angee.iam.models
Source models for Angee identity.
Pure identity: the swappable User and its manager. The OAuth connection substrate (OAuthClient/ExternalAccount/Credential) is owned by integrate; OIDC login fields are contributed onto that OAuth client by iam_integrate_oidc.
UserManager
class UserManager(RebacManager, BaseUserManager)Manager for Angee's composed user model.
get_by_natural_key
def get_by_natural_key(username: str) -> AnyReturn a user for credential checks without row-scope filtering.
get
def get(*args: Any, **kwargs: Any) -> AnyReturn a user, bypassing REBAC only for session primary keys.
aget_by_natural_key
async def aget_by_natural_key(username: str) -> AnyAsync sibling of get_by_natural_key.
create_user
def create_user(username: str,
email: str | None = None,
password: str | None = None,
**extra_fields: Any) -> AnyCreate and save a regular user.
create_superuser
def create_superuser(username: str,
email: str | None = None,
password: str | None = None,
**extra_fields: Any) -> AnyCreate and save a superuser.
User
class User(SqidMixin, AbstractBaseUser, RebacPermissionsMixin, AngeeModel)Abstract swappable user model composed into Angee runtimes.
Meta
class Meta()Django model options for the IAM user source.
clean
def clean() -> NoneNormalize username and email before validation.
save
def save(*args: Any, **kwargs: Any) -> NonePersist the user and mirror superuser status to the admin role.
get_full_name
def get_full_name() -> strReturn first and last name joined with a space.
get_short_name
def get_short_name() -> strReturn the user's short display name.