Sysadmin¶
System configuration and users.
Entity Relationship Diagram¶
Entities¶
iris.domain.sysadmin.entities
¶
Sysadmin domain entities: User and Role.
User
¶
A system user with authentication credentials and admin status.
user_id is the stable immutable identifier (e.g. a UUID or SSO
subject). is_active controls login access; is_admin grants
elevated privileges. Authentication secrets (passwords, tokens) are
not stored here — this entity models identity, not credentials.
Role
¶
An authorization role that can be assigned to users.
Roles group permissions under a named label (role_name).
role_description documents the intended scope of access.
is_active allows a role to be retired without deleting it from
historical assignment records.
Objects¶
iris.domain.sysadmin.objects
¶
Sysadmin domain value objects (currently empty).
Repositories¶
iris.domain.sysadmin.repositories
¶
Repository interfaces for the sysadmin domain.
UserRepository
¶
Events¶
iris.domain.sysadmin.events
¶
Domain events for the sysadmin bounded context.
UserCreated
¶
Emitted when a new user account is created in the system.
UserDeactivated
¶
Emitted when a user account is deactivated.
UserPasswordChanged
¶
Emitted when a user's password is changed.
RoleCreated
¶
Emitted when a new authorization role is created.
RoleAssignedToUser
¶
Emitted when a role is assigned to a user.
RoleRevokedFromUser
¶
Emitted when a role is revoked from a user.
Exceptions¶
iris.domain.sysadmin.exceptions
¶
Exceptions for the sysadmin domain.
SysadminError
¶
Bases: Exception
Base exception for the sysadmin domain.
UserNotFoundError
¶
Bases: SysadminError
Raised when a user cannot be found by the given identifier.
RoleNotFoundError
¶
Bases: SysadminError
Raised when a role cannot be found by the given identifier.
DuplicateUserEmailError
¶
Bases: SysadminError
Raised when registering a user with an email that already exists.
UserAlreadyDeactivatedError
¶
Bases: SysadminError
Raised when attempting to deactivate a user who is already inactive.
RoleAlreadyAssignedError
¶
Bases: SysadminError
Raised when assigning a role to a user who already has that role.