mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
feat(admin): accept domain entries in the email blocklist (#3129)
This commit is contained in:
@@ -13427,7 +13427,10 @@
|
||||
"BanEmailRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {"description": "Email address to ban", "allOf": [{"$ref": "#/components/schemas/EmailType"}]}
|
||||
"email": {
|
||||
"description": "Email address to ban, or a domain written as @example.com to ban every address at it and its subdomains",
|
||||
"allOf": [{"$ref": "#/components/schemas/EmailBlocklistEntryType"}]
|
||||
}
|
||||
},
|
||||
"required": ["email"]
|
||||
},
|
||||
@@ -13436,7 +13439,7 @@
|
||||
"properties": {"ip": {"description": "IPv4/IPv6 address or CIDR range to ban", "type": "string"}},
|
||||
"required": ["ip"]
|
||||
},
|
||||
"EmailType": {"type": "string"},
|
||||
"EmailBlocklistEntryType": {"type": "string"},
|
||||
"CheckAvatarHashRequest": {
|
||||
"type": "object",
|
||||
"properties": {"hashes": {"minItems": 1, "maxItems": 1000, "type": "array", "items": {"type": "string"}}},
|
||||
@@ -16036,6 +16039,7 @@
|
||||
{"name": "PERKS_DISABLED", "value": "256", "description": "User has temporarily disabled premium perks"}
|
||||
]
|
||||
},
|
||||
"EmailType": {"type": "string"},
|
||||
"AdminRelationshipEntrySchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -11,7 +11,7 @@ impl AdminApiClient {
|
||||
"email",
|
||||
generated_types::AdminBlocklistEntryCreateRequest::from(
|
||||
generated_types::BanEmailRequest {
|
||||
email: generated_types::EmailType::from(email.to_owned()),
|
||||
email: generated_types::EmailBlocklistEntryType::from(email.to_owned()),
|
||||
},
|
||||
),
|
||||
audit_log_reason,
|
||||
|
||||
@@ -37,10 +37,10 @@ pub const BAN_CONFIGS: &[BanConfig] = &[
|
||||
BanConfig {
|
||||
title: "Email Bans",
|
||||
route: "/email-bans",
|
||||
input_label: "Email Address",
|
||||
input_label: "Email Address or Domain",
|
||||
input_name: "email",
|
||||
input_type: "email",
|
||||
placeholder: "[email protected]",
|
||||
input_type: "text",
|
||||
placeholder: "[email protected] or @example.com",
|
||||
entity_name: "Email",
|
||||
active_page: "email-bans",
|
||||
show_bulk_tools: false,
|
||||
|
||||
Reference in New Issue
Block a user