Mercurial > psgxs
diff psgxs.js @ 7:781ac4f1e304
Allow others JIDs than super-owners to create nodes.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 26 Aug 2010 23:43:45 +0200 |
parents | 2bcadb0531f4 |
children | efe8dbd34780 |
line wrap: on
line diff
--- a/psgxs.js +++ b/psgxs.js @@ -689,10 +689,17 @@ function onIq(stanza) { var bare = toBareJID(to); var right = false; + + // Check for super-owner for (var i in config.owner) if (config.owner[i] == bare) right = true; + // Check for authorized user + for (var i in config.allowCreateNode) + if (config.allowCreateNode[i].exec(bare)) + right = true; + if (!right) return makeError(response, errors.forbidden.n);