Browse Source
Merge pull request #300 from Tecnativa/11.0-fix-mt_mailgun_acl
[FIX] mail_tracking_mailgun: permissions
pull/304/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
mail_tracking_mailgun/__manifest__.py
-
mail_tracking_mailgun/models/mail_tracking_email.py
|
@ -6,7 +6,7 @@ |
|
|
{ |
|
|
{ |
|
|
"name": "Mail tracking for Mailgun", |
|
|
"name": "Mail tracking for Mailgun", |
|
|
"summary": "Mail tracking and Mailgun webhooks integration", |
|
|
"summary": "Mail tracking and Mailgun webhooks integration", |
|
|
"version": "11.0.1.1.1", |
|
|
|
|
|
|
|
|
"version": "11.0.1.1.2", |
|
|
"category": "Social Network", |
|
|
"category": "Social Network", |
|
|
"website": "https://github.com/OCA/social", |
|
|
"website": "https://github.com/OCA/social", |
|
|
"author": "Tecnativa, " |
|
|
"author": "Tecnativa, " |
|
|
|
@ -64,7 +64,7 @@ class MailTrackingEmail(models.Model): |
|
|
digestmod=hashlib.sha256).hexdigest() |
|
|
digestmod=hashlib.sha256).hexdigest() |
|
|
|
|
|
|
|
|
def _mailgun_values(self): |
|
|
def _mailgun_values(self): |
|
|
icp = self.env['ir.config_parameter'] |
|
|
|
|
|
|
|
|
icp = self.env['ir.config_parameter'].sudo() |
|
|
api_key = icp.get_param('mailgun.apikey') |
|
|
api_key = icp.get_param('mailgun.apikey') |
|
|
if not api_key: |
|
|
if not api_key: |
|
|
raise ValidationError(_('There is no Mailgun API key!')) |
|
|
raise ValidationError(_('There is no Mailgun API key!')) |
|
@ -79,7 +79,8 @@ class MailTrackingEmail(models.Model): |
|
|
|
|
|
|
|
|
def _mailgun_signature_verify(self, event): |
|
|
def _mailgun_signature_verify(self, event): |
|
|
event = event or {} |
|
|
event = event or {} |
|
|
api_key = self.env['ir.config_parameter'].get_param('mailgun.apikey') |
|
|
|
|
|
|
|
|
icp = self.env['ir.config_parameter'].sudo() |
|
|
|
|
|
api_key = icp.get_param('mailgun.apikey') |
|
|
if not api_key: |
|
|
if not api_key: |
|
|
_logger.warning("No Mailgun api key configured. " |
|
|
_logger.warning("No Mailgun api key configured. " |
|
|
"Please add 'mailgun.apikey' to System parameters " |
|
|
"Please add 'mailgun.apikey' to System parameters " |
|
|