Skip to content

[backlog] Prevent sending multiple emails for attempted self-registration / create admin alerts #2937

@tcompa

Description

@tcompa

Note: what is described below is non-critical, for realistic numbers of events.
Still it's a useful way to play around with Alerts - possibly in view of future notification system.
Currently not a priority.


New AdminAlert table:

id:
timestamp:
type: str (enum)
active: bool = True
data: str
generic_id: str | None   # TBD, it's only a way to filter existing data
alert = db.execute(select(AdminAlert).where(AdminAlert.type == "self_registration").where(AdminAlert.generic_id == email)
if alert is None:
    send email
    create alert - if successful
else:
   log.warning("[email protected] tried again")

API

GET /admin/v2/alerts/?type=self_registration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions