feat: domain edit/delete, fix logs, add admin quarantine with block
- Add ajax_woocow_admin_domain_edit and _delete PHP handlers
- Domain table: richer columns (mailboxes used/limit, quota), icon buttons
- Edit domain modal: pre-populates fields, loads relayhosts for transport select
- Fix logs: correct Mailcow API slugs (rspamd-history, ratelimited) and add /{count} suffix to endpoint
- Add admin Quarantine submenu: view all quarantined messages, delete, blacklist sender via domain policy
- Add domain policy methods to API class (add/delete/get_bl)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -183,6 +183,24 @@ class WooCow_API {
|
||||
return $this->request( 'POST', '/api/v1/delete/quarantine', [ 'items' => [ $id ] ] );
|
||||
}
|
||||
|
||||
// ── Domain Policies ──────────────────────────────────────────────────────
|
||||
|
||||
public function get_domain_policy_bl( string $domain ): array {
|
||||
return $this->request( 'GET', '/api/v1/get/policy_bl_domain/' . rawurlencode( $domain ) );
|
||||
}
|
||||
|
||||
public function add_domain_policy( string $domain, string $object_from, string $list = 'bl' ): array {
|
||||
return $this->request( 'POST', '/api/v1/add/domain-policy', [
|
||||
'domain' => $domain,
|
||||
'object_from' => $object_from,
|
||||
'object_list' => $list,
|
||||
] );
|
||||
}
|
||||
|
||||
public function delete_domain_policy( array $prefids ): array {
|
||||
return $this->request( 'POST', '/api/v1/delete/domain-policy', [ 'items' => $prefids ] );
|
||||
}
|
||||
|
||||
// ── Helpers ──────────────────────────────────────────────────────────────
|
||||
|
||||
public function get_webmail_url(): string {
|
||||
|
||||
Reference in New Issue
Block a user