summaryrefslogtreecommitdiff
path: root/addons/mail/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/controllers/main.py')
-rw-r--r--addons/mail/controllers/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py
index c1b4433e74a..25ea7b008ce 100644
--- a/addons/mail/controllers/main.py
+++ b/addons/mail/controllers/main.py
@@ -77,7 +77,10 @@ class MailController(http.Controller):
record_action = record_sudo.get_access_action(access_uid=uid)
else:
record_action = record_sudo.get_access_action()
+ if record_action['type'] == 'ir.actions.act_url' and record_action.get('target_type') != 'public':
+ return cls._redirect_to_messaging()
+ record_action.pop('target_type', None)
# the record has an URL redirection: use it directly
if record_action['type'] == 'ir.actions.act_url':
return werkzeug.utils.redirect(record_action['url'])