[Web] return sender_acl in get/mailbox API#7348
Open
smpaz7467 wants to merge 1 commit into
Open
Conversation
sender_acl can be set through edit/mailbox but was never returned by
get/mailbox, so an API client could not read back what it had written,
and get/mailbox/all / get/mailbox/{mailbox} both omitted it.
Add the mailbox's internal send-as ACL (the sender_acl table rows with
external = 0) to mailbox_details as sender_acl, an array of send_as
values, mirroring the field edit/mailbox accepts. It is added in the same
block as the other detailed fields, so the lightweight get/mailbox/reduced
endpoint is unaffected.
Fixes mailcow#7011
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sender_aclcan be set viaPOST /api/v1/edit/mailbox, but it was neverreturned by
GET /api/v1/get/mailbox/{mailbox}or.../get/mailbox/all. An APIclient therefore can't read back what it wrote, and can't see a mailbox's send-as
permissions at all.
Fix
Add the mailbox's internal send-as ACL to
mailbox_detailsassender_acl— anarray of
send_asvalues from thesender_acltable (external = 0), mirroring thefield
edit/mailboxaccepts, so a get→edit round-trip is symmetric.It's added in the same detailed-fields block as
rl/quota info, so the deliberatelylightweight
get/mailbox/reducedendpoint is unaffected.Verification (live stack)
Round-trip confirmed;
reducedunchanged;php -lclean.Fixes #7011