Hi,
I would like to use ejabberd with a set of 'static' rosters in the following way: roster management is done only via script access (RPC, SQL acccess etc.) or by administrators. Users should not be able to change (add, delete, modify etc.) roster items via their XMPP clients.
I have searched for a solution of this kind of problem for some time now but did not find any acceptable way without being forced to modify the source of ejabberd to block user access to rosters. Any hints / ideas?
Many thanks advance!
Try this small mod_filterroster.erl
Try this small mod_filterroster.erl module. It drops all the XMPP packets that are typically used to modify the roster. Note that it drops packets even from admins, and for all vhosts.
Here is the source code:
Thanks a lot!
Hi badlop,
many thanks for providing this filter! It works great!
There is still a small problem: Though all packets regarding the roster are filtered, it is still possible to add an item to an user's roster (checked via Web-Interface). Any other operation (deletion, modification etc.) is blocked successfully.
Legoscia found a bug. Try new version
Legoscia found a bug. I've updated the code on my initial comment. You can see that at the end there are now several "".
Atoms → strings
Shouldn't those be strings?