diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/models.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webmentions_ssg/models.py b/webmentions_ssg/models.py index 2b375dd..2304788 100644 --- a/webmentions_ssg/models.py +++ b/webmentions_ssg/models.py @@ -101,6 +101,24 @@ class User(UserMixin, Base): return check_password_hash(self.password_hash, password) +class BlockedSource(Base): + """A source domain denied before verification or outbound fetching.""" + + __tablename__ = "blocked_sources" + + id: Mapped[int] = mapped_column(primary_key=True) + domain: Mapped[str] = mapped_column(Text(), nullable=False, unique=True) + + +class AllowedSource(Base): + """A source domain accepted when allowlist mode is enabled.""" + + __tablename__ = "allowed_sources" + + id: Mapped[int] = mapped_column(primary_key=True) + domain: Mapped[str] = mapped_column(Text(), nullable=False, unique=True) + + class ReceivedWebmention(Base): """Represent a Webmention received for verification.""" |
