From 4b0a82cc2f4597a11b9275cf156ae9cceffaf44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 4 May 2020 00:12:46 +0200 Subject: Fix some etherpad-lite modules and packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upgrade to 1.8.3 broke many modules, which were patched to continue working correctly. This commit also reworks the module system, making it similar to python’s withPackages. --- .../etherpad-lite/modules/ep_mypads/fix_ldap.patch | 33 ++-------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'pkgs/webapps/etherpad-lite/modules/ep_mypads') diff --git a/pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch b/pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch index 738a066..6ade6cb 100644 --- a/pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch +++ b/pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch @@ -1,5 +1,5 @@ diff --git a/auth.js b/auth.js -index ce77ee4..de66b03 100644 +index ce77ee4..235d8e6 100644 --- a/auth.js +++ b/auth.js @@ -91,6 +91,7 @@ var cuid = require('cuid'); @@ -10,19 +10,7 @@ index ce77ee4..de66b03 100644 var NOT_INTERNAL_AUTH_PWD = 'soooooo_useless'; -@@ -212,6 +213,7 @@ module.exports = (function () { - } - return callback(new Error(emsg), false); - } -+ console.log("before user.get"); - user.get(login, function(err, u) { - var props = ldapConf.properties; - var mail; -@@ -229,27 +231,30 @@ module.exports = (function () { - return callback(new Error(emsg), false); - } - if (err) { -+ console.log("in user.get err"); +@@ -232,21 +233,21 @@ module.exports = (function () { // We have to create the user in mypads database ldapConf = conf.get('authLdapSettings'); user.set({ @@ -43,7 +31,6 @@ index ce77ee4..de66b03 100644 + u.lastname !== utils.getSingleton(ldapuser[props.lastname])) { // Update database and cache informations if needed // (i.e. update from LDAP) -+ console.log("in user.get update"); u.email = mail; - u.firstname = ldapuser[props.firstname]; - u.lastname = ldapuser[props.lastname]; @@ -52,22 +39,6 @@ index ce77ee4..de66b03 100644 u.password = NOT_INTERNAL_AUTH_PWD; user.set(u, callback); } else { -+ console.log("in user.get callback"); - return callback(null, u); - } - }); -diff --git a/model/common.js b/model/common.js -index b19829b..9421742 100644 ---- a/model/common.js -+++ b/model/common.js -@@ -94,6 +94,7 @@ module.exports = (function() { - var isFS = function (s) { return (ld.isString(s) && !ld.isEmpty(s)); }; - ld.forEach(strFields, function (s) { - if (!isFS(params[s])) { -+ console.log(params, s); - throw new TypeError('BACKEND.ERROR.TYPE.PARAM_STR'); - } - if (s.length > 100) { diff --git a/utils.js b/utils.js index 32c2727..d381d06 100644 --- a/utils.js -- cgit v1.2.3