Skip to content

[19.0][FIX] mail_gateway*: use sudo to read gateways as non-admin users - #363

Merged
OCA-git-bot merged 4 commits into
OCA:19.0from
Tecnativa:19.0-mail_gateway-access
Nov 19, 2026
Merged

OCA-git-bot merged 4 commits into
OCA:19.0from
Tecnativa:19.0-mail_gateway-access

Conversation

@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor

Complementary to #317

Found during the migration to 20.0 and partially backported from:

See each commit for more details.

@Tecnativa @pedrobaeza @etobella could you please review this?

Gateway users without administration rights got an AccessError when sending a message with the 'Send with gateway' wizard, merging a guest into a contact or loading the models of the 'Link to thread' wizard, as mail.gateway is only readable by administrators.
…sers

Gateway users without administration rights got an AccessError when loading a Telegram channel in Discuss (avatar) or when editing a message sent through Telegram, as mail.gateway is only readable by administrators.
…sers

Gateway users without administration rights got an AccessError when opening the WhatsApp composer, sending a WhatsApp message from a document or a server action, or loading a WhatsApp channel in Discuss (avatar), as mail.gateway is only readable by administrators.
("gateway") is a string, not a tuple, so 'not in' checked for a substring of 'gateway' instead of the gateway channel type.
@OCA-git-bot OCA-git-bot added series:19.0 mod:mail_gateway Module mail_gateway mod:mail_gateway_whatsapp Module mail_gateway_whatsapp mod:mail_gateway_telegram Module mail_gateway_telegram labels Nov 18, 2026

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to the permission forbidding done as security patch, so let's fast-track it for making it work again.

It should be needed though in 18 and 17.

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 19.0-ocabot-merge-pr-363-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit da068ce into OCA:19.0 Nov 19, 2026
10 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 5a0f5c4. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza
pedrobaeza deleted the 19.0-mail_gateway-access branch November 19, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged 🎉 mod:mail_gateway_telegram Module mail_gateway_telegram mod:mail_gateway_whatsapp Module mail_gateway_whatsapp mod:mail_gateway Module mail_gateway series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants