comparison modules/mod_configure.js @ 47:0d3f18bb1d36

Remove usage of fdsq.js in modules.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 10 Mar 2011 16:13:49 +0100
parents 023f767662d3
children addbf6bbfaa8
comparison
equal deleted inserted replaced
46:3126f8d6a5e3 47:0d3f18bb1d36
33 if (!nodeID || nodeID == '') 33 if (!nodeID || nodeID == '')
34 return makeError(response, errors.nodeid_required.n); 34 return makeError(response, errors.nodeid_required.n);
35 if (!storage.existsNode(nodeID)) 35 if (!storage.existsNode(nodeID))
36 return makeError(response, errors.node_does_not_exist.n); 36 return makeError(response, errors.node_does_not_exist.n);
37 37
38 var affil = storage.getAffiliation(toBareJID(to), nodeID); 38 var affil = storage.getAffiliation(JID.toBare(to), nodeID);
39 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only') 39 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only')
40 return makeError(response, errors.pub.publish.insufficient_privileges.n); 40 return makeError(response, errors.pub.publish.insufficient_privileges.n);
41 41
42 var conf = storage.getConfiguration(nodeID); 42 var conf = storage.getConfiguration(nodeID);
43 if (!conf) 43 if (!conf)
87 if (!nodeID) 87 if (!nodeID)
88 return makeError(response, errors.nodeid_required.n); 88 return makeError(response, errors.nodeid_required.n);
89 if (!storage.existsNode(nodeID)) 89 if (!storage.existsNode(nodeID))
90 return makeError(response, errors.node_does_not_exist.n); 90 return makeError(response, errors.node_does_not_exist.n);
91 91
92 var affil = storage.getAffiliation(toBareJID(to), nodeID); 92 var affil = storage.getAffiliation(JID.toBare(to), nodeID);
93 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only') 93 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only')
94 return makeError(response, errors.forbidden.n); 94 return makeError(response, errors.forbidden.n);
95 95
96 var x = request.getChild('x', 'jabber:x:data'); 96 var x = request.getChild('x', 'jabber:x:data');
97 if (!x) 97 if (!x)
135 if (!nodeID) 135 if (!nodeID)
136 return makeError(response, errors.nodeid_required.n); 136 return makeError(response, errors.nodeid_required.n);
137 if (!storage.existsNode(nodeID)) 137 if (!storage.existsNode(nodeID))
138 return makeError(response, errors.node_does_not_exist.n); 138 return makeError(response, errors.node_does_not_exist.n);
139 139
140 var affil = storage.getAffiliation(toBareJID(to), nodeID); 140 var affil = storage.getAffiliation(JID.toBare(to), nodeID);
141 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only') 141 if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only')
142 return makeError(response, errors.forbidden.n); 142 return makeError(response, errors.forbidden.n);
143 143
144 var x = request.getChild('x', 'jabber:x:data'); 144 var x = request.getChild('x', 'jabber:x:data');
145 if (!x) 145 if (!x)