Maintainers
+Maintainers
This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
diff --git a/base_search_mail_content/README.rst b/base_search_mail_content/README.rst
index 4b9a3b95e..0d299e5fc 100644
--- a/base_search_mail_content/README.rst
+++ b/base_search_mail_content/README.rst
@@ -67,6 +67,15 @@ Usage
Go to any model that contains a chatter (e.g. Contacts, ...). Search for
content in field 'Message Content'.
+Known issues / Roadmap
+======================
+
+- This module restricts the message_content search functionality to
+ internal users only, addressing the issue faced by project
+ collaborators (portal users) as described in
+ https://github.com/OCA/social/issues/1204. Consequently, portal users
+ no longer have the ability to search within mail content.
+
Bug Tracker
===========
diff --git a/base_search_mail_content/models/mail_thread.py b/base_search_mail_content/models/mail_thread.py
index 43a57df70..9c8f453d6 100644
--- a/base_search_mail_content/models/mail_thread.py
+++ b/base_search_mail_content/models/mail_thread.py
@@ -44,7 +44,11 @@ class MailThread(models.AbstractModel):
that inherits mail.thread
"""
res = super().get_view(view_id=view_id, view_type=view_type, options=options)
- if view_type == "search" and self._fields.get("message_content"):
+ if (
+ view_type == "search"
+ and self._fields.get("message_content")
+ and self.env.user.has_group("base.group_user")
+ ):
doc = etree.XML(res["arch"])
for node in doc.xpath("/search/field[last()]"):
# Add message_content in search view
diff --git a/base_search_mail_content/readme/ROADMAP.md b/base_search_mail_content/readme/ROADMAP.md
new file mode 100644
index 000000000..520a531ef
--- /dev/null
+++ b/base_search_mail_content/readme/ROADMAP.md
@@ -0,0 +1 @@
+- This module restricts the message_content search functionality to internal users only, addressing the issue faced by project collaborators (portal users) as described in
Go to any model that contains a chatter (e.g. Contacts, …). Search for content in field ‘Message Content’.
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -418,9 +429,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
Do not contact contributors directly about support or help with technical issues.
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose