From 298853acd53b5dec02b4114c9827fae0b383ae72 Mon Sep 17 00:00:00 2001 From: Robbie Saunders Date: Fri, 6 Oct 2017 16:07:01 -0700 Subject: [PATCH 1/2] Add user to remove hook Adds the request user to the remove hook as _req_user, like it does for update etc. --- admin/server/api/list/delete.js | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/server/api/list/delete.js b/admin/server/api/list/delete.js index 53a966d1af..c5fdde2128 100644 --- a/admin/server/api/list/delete.js +++ b/admin/server/api/list/delete.js @@ -38,6 +38,7 @@ module.exports = function (req, res) { return res.apiError('database error', err); } async.forEachLimit(results, 10, function (item, next) { + item._req_user = req.user; item.remove(function (err) { if (err) return next(err); deletedCount++; From 78aeaa169aca2e2956bc30e7e708cbc369c20639 Mon Sep 17 00:00:00 2001 From: Robbie Saunders Date: Mon, 27 Nov 2017 09:30:12 -0800 Subject: [PATCH 2/2] Fix CSV export for CloudinaryImages Initializes the options object regardless of whether cloudinary secure is set. --- fields/types/cloudinaryimages/CloudinaryImagesType.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fields/types/cloudinaryimages/CloudinaryImagesType.js b/fields/types/cloudinaryimages/CloudinaryImagesType.js index 6e52cc53d3..25231393f1 100644 --- a/fields/types/cloudinaryimages/CloudinaryImagesType.js +++ b/fields/types/cloudinaryimages/CloudinaryImagesType.js @@ -114,8 +114,8 @@ cloudinaryimages.prototype.addToSchema = function (schema) { }); var src = function (img, options) { + options = options || {}; if (keystone.get('cloudinary secure')) { - options = options || {}; options.secure = true; } options.format = options.format || img.format;