views:

57

answers:

1

I've browsed the module development documentation but I can't find an API that would help me determine if 'user' (i.e. identified through a JID) is allowed administrative access.

I understand there is the module 'acl' which looks promising (or probably the answer altogether) but no public API is documented.

Should I just assume that the module 'acl' is the proper way to access user credentials?

+2  A: 

Yes, the acl module is what you're looking for:

acl:match_rule(Host, admin, Jid) =:= allow

This is true if Jid is an admin for the virtual host Host. (Assuming you have acls that define 'admin' in your ejabberd.cfg file)

archaelus