[NEW] Automatic install mailhog. Mailhog integration in Odoo
This commit is contained in:
@@ -14,13 +14,8 @@ MAILHOG_BASE = "http://localhost:8025"
|
||||
|
||||
class MailcatcherProxy(http.Controller):
|
||||
|
||||
@http.route('/mailcatcher', type='http', auth='user', website=False)
|
||||
def mailcatcher_index(self, **kw):
|
||||
"""Redirect to the MailHog UI index page."""
|
||||
return request.redirect('/mailcatcher/')
|
||||
|
||||
@http.route('/mailcatcher/<path:subpath>', type='http', auth='user',
|
||||
website=False, csrf=False)
|
||||
@http.route(['/mailcatcher', '/mailcatcher/<path:subpath>'],
|
||||
type='http', auth='user', website=False, csrf=False)
|
||||
def mailcatcher_proxy(self, subpath='', **kw):
|
||||
"""Proxy requests to the local MailHog instance."""
|
||||
target_url = f"{MAILHOG_BASE}/{subpath}"
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_mailcatcher_menu_mailcatcher_menu","mailcatcher_menu.mailcatcher_menu","model_mailcatcher_menu_mailcatcher_menu","base.group_user",1,1,1,1
|
||||
"access_mailcatcher_install_warning_wizard","mailcatcher.install.warning.wizard","model_mailcatcher_install_warning_wizard","base.group_user",1,1,1,1
|
||||
|
||||
|
Reference in New Issue
Block a user