aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch')
-rw-r--r--pkgs/webapps/etherpad-lite/modules/ep_mypads/fix_ldap.patch33
1 files changed, 2 insertions, 31 deletions
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 @@
1diff --git a/auth.js b/auth.js 1diff --git a/auth.js b/auth.js
2index ce77ee4..de66b03 100644 2index ce77ee4..235d8e6 100644
3--- a/auth.js 3--- a/auth.js
4+++ b/auth.js 4+++ b/auth.js
5@@ -91,6 +91,7 @@ var cuid = require('cuid'); 5@@ -91,6 +91,7 @@ var cuid = require('cuid');
@@ -10,19 +10,7 @@ index ce77ee4..de66b03 100644
10 10
11 var NOT_INTERNAL_AUTH_PWD = 'soooooo_useless'; 11 var NOT_INTERNAL_AUTH_PWD = 'soooooo_useless';
12 12
13@@ -212,6 +213,7 @@ module.exports = (function () { 13@@ -232,21 +233,21 @@ module.exports = (function () {
14 }
15 return callback(new Error(emsg), false);
16 }
17+ console.log("before user.get");
18 user.get(login, function(err, u) {
19 var props = ldapConf.properties;
20 var mail;
21@@ -229,27 +231,30 @@ module.exports = (function () {
22 return callback(new Error(emsg), false);
23 }
24 if (err) {
25+ console.log("in user.get err");
26 // We have to create the user in mypads database 14 // We have to create the user in mypads database
27 ldapConf = conf.get('authLdapSettings'); 15 ldapConf = conf.get('authLdapSettings');
28 user.set({ 16 user.set({
@@ -43,7 +31,6 @@ index ce77ee4..de66b03 100644
43+ u.lastname !== utils.getSingleton(ldapuser[props.lastname])) { 31+ u.lastname !== utils.getSingleton(ldapuser[props.lastname])) {
44 // Update database and cache informations if needed 32 // Update database and cache informations if needed
45 // (i.e. update from LDAP) 33 // (i.e. update from LDAP)
46+ console.log("in user.get update");
47 u.email = mail; 34 u.email = mail;
48- u.firstname = ldapuser[props.firstname]; 35- u.firstname = ldapuser[props.firstname];
49- u.lastname = ldapuser[props.lastname]; 36- u.lastname = ldapuser[props.lastname];
@@ -52,22 +39,6 @@ index ce77ee4..de66b03 100644
52 u.password = NOT_INTERNAL_AUTH_PWD; 39 u.password = NOT_INTERNAL_AUTH_PWD;
53 user.set(u, callback); 40 user.set(u, callback);
54 } else { 41 } else {
55+ console.log("in user.get callback");
56 return callback(null, u);
57 }
58 });
59diff --git a/model/common.js b/model/common.js
60index b19829b..9421742 100644
61--- a/model/common.js
62+++ b/model/common.js
63@@ -94,6 +94,7 @@ module.exports = (function() {
64 var isFS = function (s) { return (ld.isString(s) && !ld.isEmpty(s)); };
65 ld.forEach(strFields, function (s) {
66 if (!isFS(params[s])) {
67+ console.log(params, s);
68 throw new TypeError('BACKEND.ERROR.TYPE.PARAM_STR');
69 }
70 if (s.length > 100) {
71diff --git a/utils.js b/utils.js 42diff --git a/utils.js b/utils.js
72index 32c2727..d381d06 100644 43index 32c2727..d381d06 100644
73--- a/utils.js 44--- a/utils.js