# HG changeset patch # User Emmanuel Gil Peyrot # Date 1277755371 -7200 # Node ID d3ae2f8b685dfc57e23fba88d1f96276a5586383 # Parent c2954a9e5665440dbc3548c9e11a15f374a6e267 Make create node working. diff --git a/psgxs.js b/psgxs.js --- a/psgxs.js +++ b/psgxs.js @@ -677,8 +677,13 @@ function onIq(stanza) { if (storage.existsNode(nodeID)) return makeError(response, errors.nodeid_already_exists.n); - var affil = storage.getAffiliation(toBareJID(to), nodeID); - if (affil != 'super-owner' && affil != 'owner' && affil != 'publish-only') + var bare = toBareJID(to); + var right = false; + for (var i in config.owner) + if (config.owner[i] == bare) + right = true; + + if (!right) return makeError(response, errors.forbidden.n); var configure = pubsub.getChild('configure');