summaryrefslogtreecommitdiff
path: root/addons/link_tracker/controller/main.py
AgeCommit message (Collapse)Author
2019-07-04[FIX] *: use `auth='public'` in controllers that use `request.env`Raphael Collet
The following trick used to work, because `sudo()` was actually making an environment for the superuser to operate upon: request.env[...].sudo().method(...) It no longer works in general, since `sudo()` now makes an environment in superuser mode but with `uid=None`! It may still work by accident for operations that never use `env.uid`, but is broken in general. Using `auth='public'` fixes the problem by using the public user when no user is available. closes odoo/odoo#34297 Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-01-14[REF] link_tracker, mass_mailing: simplify add_click method and add testsThibault Delavallée
In this commit we rewrite a bit add_click in order to remove the inlined sudo and ease inheritance and parameter management inside the method. Access through controllers is sudo-ed as the main API method is now done with current user access rights. This commit is linked to task ID 1904277 and PR #28242.
2019-01-14[REF] link_tracker: do not let public read technical / private link dataThibault Delavallée
Link tracker models are rather technical and should not be accessed as it is by external people. Let us delegate control to controllers and lessen a bit model accessibility. Currently everyone can use add_click method and generate statistics. Now statistics will be generated only through dedicated routes. It will make statistics more reliable and ensure technical data remain private. Next commit will update code from controllers and main methods in order to be have a more readable click API and avoid link between non dependent modules. This commit is linked to task ID 1904277 and PR #28242.
2016-09-09[MERGE] forward port branch saas-12 up to 9f28139Christophe Simonis
2016-09-06[FIX] link_tracker: fix link tracer when no geoip in sessionDenis Ledoux
The `geoip` is not always defined in the session, and therefore one needs to check it's defined before attempting to use it. The same is done at different places in the code, through the different modules. opw-687783
2016-08-10[IMP] various: use odoo for imports instead of openerp and update class namesThibault Delavallée
2016-08-03[REF] web, *: change deprecated import openerp.addons.web.http to odoo.httpfwi-odoo
We also remove the mock in web as there is no need for it anymore.
2015-07-10[IMP] mass_mailing: remove depends to website. Create a website_mass_mailing ↵Christophe Matthieu
bridge to add subscribe snippet into website builder. Split website_links to have link_tracker to create short and trackable URLs, and website_links to have a website layout for link_tracker and add button to share page.