diff options
| author | Romain Derie <rde@odoo.com> | 2018-11-19 14:36:31 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2018-11-23 14:51:07 +0000 |
| commit | 8b1a05d9e09dca317ca38422d75f459a7e1784aa (patch) | |
| tree | f2e8c5c079e067450f6aa979d84d60eb4eeec11c /addons/web_unsplash/static/src/js/unsplash_image_widget.js | |
| parent | cd2637cfdf0ec2c5dc2fa2b74b29fdffac822e87 (diff) | |
[FIX] web_unsplash: don't expose client_id in network
Unsplash CEO asked us to stop exposing our key client side (even if it was
only in the browser network and previously allowed by their API team leader).
After multiple exchange, it has been negociated that:
1. Our non saas user won't be able to apply for a production key and should
prefix they Unsplash application name by 'Odoo:'. Their key will remain in
test mode.
Indeed, Unsplash won't be able to review every Odoo application and ensure
it respects the API terms and it is a real application.
2. Our saas user will query Unsplash with a dedicated enterprise key
3. The documentation should explain it all
Task-1911345
Diffstat (limited to 'addons/web_unsplash/static/src/js/unsplash_image_widget.js')
| -rw-r--r-- | addons/web_unsplash/static/src/js/unsplash_image_widget.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/addons/web_unsplash/static/src/js/unsplash_image_widget.js b/addons/web_unsplash/static/src/js/unsplash_image_widget.js index d353694ddea..ab900d6a03c 100644 --- a/addons/web_unsplash/static/src/js/unsplash_image_widget.js +++ b/addons/web_unsplash/static/src/js/unsplash_image_widget.js @@ -88,10 +88,6 @@ ImageWidget.include({ res_id: self.options.res_id, } }).then(function (images) { - for (var img in self._unsplash.selectedImages) { - self.unsplashAPI.notifyDownload(self._unsplash.selectedImages[img].download_url); - } - _.each(images, function (image) { image.src = image.url; image.isDocument = !(/gif|jpe|jpg|png/.test(image.mimetype)); @@ -140,7 +136,7 @@ ImageWidget.include({ self.$('.unsplash_img_container').html(QWeb.render('web_unsplash.dialog.image.content', { rows: rows })); self._highlightSelectedImages(); }).fail(function (err) { - self.$('.unsplash_img_container').html(QWeb.render('web_unsplash.dialog.error.content', err)); + self.$('.unsplash_img_container').html(QWeb.render('web_unsplash.dialog.error.content', { status: err })); }).always(function () { self._toggleAttachmentContaines(false); }); |
