Mercurial > psgxs
comparison modules/mod_manage.js @ 30:b2faacfefb90
Rewrite of the module manager; fix of some modules; fix of the directory backend.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 04 Nov 2010 17:50:52 +0100 |
parents | b80ab94da447 |
children | 6697f394301f |
comparison
equal
deleted
inserted
replaced
29:e007a6364bf0 | 30:b2faacfefb90 |
---|---|
8 // SECTION 8.8.1: Retrieve Subscriptions List | 8 // SECTION 8.8.1: Retrieve Subscriptions List |
9 exports.manageRetrieveSub = { | 9 exports.manageRetrieveSub = { |
10 type: 'get', | 10 type: 'get', |
11 child: 'pubsub', | 11 child: 'pubsub', |
12 ns: NS.PUBSUB_OWNER, | 12 ns: NS.PUBSUB_OWNER, |
13 pschild: 'subscriptions', | 13 child2: 'subscriptions', |
14 func: function(response, stanza, request, to) { | 14 func: function(response, stanza, request, to) { |
15 if (!config.enabled('manage-subscriptions')) | 15 if (!config.enabled('manage-subscriptions')) |
16 return makeError(response, errors.owner.manage_subscriptions.not_supported.n); | 16 return makeError(response, errors.owner.manage_subscriptions.not_supported.n); |
17 | 17 |
18 var nodeID = request.getAttribute('node'); | 18 var nodeID = request.getAttribute('node'); |
39 // SECTION 8.9.1: Retrieve Affiliations List | 39 // SECTION 8.9.1: Retrieve Affiliations List |
40 exports.manageRetrieveAff = { | 40 exports.manageRetrieveAff = { |
41 type: 'get', | 41 type: 'get', |
42 child: 'pubsub', | 42 child: 'pubsub', |
43 ns: NS.PUBSUB_OWNER, | 43 ns: NS.PUBSUB_OWNER, |
44 pschild: 'affiliations', | 44 child2: 'affiliations', |
45 func: function(response, stanza, request, to) { | 45 func: function(response, stanza, request, to) { |
46 if (!config.enabled('modify-affiliations')) | 46 if (!config.enabled('modify-affiliations')) |
47 return makeError(response, errors.owner.manage_affiliations.not_supported.n); | 47 return makeError(response, errors.owner.manage_affiliations.not_supported.n); |
48 | 48 |
49 var nodeID = request.getAttribute('node'); | 49 var nodeID = request.getAttribute('node'); |
70 // SECTION 8.8.2: Modify Subscriptions | 70 // SECTION 8.8.2: Modify Subscriptions |
71 exports.modifySub = { | 71 exports.modifySub = { |
72 type: 'set', | 72 type: 'set', |
73 child: 'pubsub', | 73 child: 'pubsub', |
74 ns: NS.PUBSUB_OWNER, | 74 ns: NS.PUBSUB_OWNER, |
75 pschild: 'subscriptions', | 75 child2: 'subscriptions', |
76 func: function(response, stanza, request, to) { | 76 func: function(response, stanza, request, to) { |
77 if (!config.enabled('manage-subscriptions')) | 77 if (!config.enabled('manage-subscriptions')) |
78 return makeError(response, errors.owner.manage_subscriptions.not_supported.n); //XXX | 78 return makeError(response, errors.owner.manage_subscriptions.not_supported.n); //XXX |
79 | 79 |
80 var nodeID = request.getAttribute('node'); | 80 var nodeID = request.getAttribute('node'); |
122 // SECTION 8.9.2: Modify Affiliation | 122 // SECTION 8.9.2: Modify Affiliation |
123 exports.modifyAff = { | 123 exports.modifyAff = { |
124 type: 'set', | 124 type: 'set', |
125 child: 'pubsub', | 125 child: 'pubsub', |
126 ns: NS.PUBSUB_OWNER, | 126 ns: NS.PUBSUB_OWNER, |
127 pschild: 'affiliations', | 127 child2: 'affiliations', |
128 func: function(response, stanza, request, to) { | 128 func: function(response, stanza, request, to) { |
129 if (!config.enabled('modify-affiliations')) | 129 if (!config.enabled('modify-affiliations')) |
130 return makeError(response, errors.owner.manage_affiliations.not_supported.n); //XXX | 130 return makeError(response, errors.owner.manage_affiliations.not_supported.n); //XXX |
131 | 131 |
132 var nodeID = request.getAttribute('node'); | 132 var nodeID = request.getAttribute('node'); |