Swiper Noswiping
Swiper Noswiping

Reputation: 76

Ejabberd limit User Registration privilege

Hi does anyone have an idea on configuring eJabberd server to allow User Registration for admin accounts only?

This is done through inband registration XEP-0077. Using Smack API as XMPP interface for java.

I tried changing ejabberd.cfg file's

Access Control Lists: {acl, admin, {user, "admin", "myserver.somewhere.here"}.

Access Rule: {access, register, [{allow, admin}, {deny, all}]}.

mod_register: {mod_register, [{access, register}]}.

But it doesn't work.

Thank you.

Upvotes: 1

Views: 1481

Answers (2)

znovotny
znovotny

Reputation: 343

Just faced the same problem and solved it by adding

    access:
      - allow: admin
      - deny: all

to the mod_register section. admin is my ACL and is set up like this:

acl:
  admin:
    user: admin@localhost

Upvotes: 1

vitalyster
vitalyster

Reputation: 5266

Just tested with ejabberd 14.07 and the new YAML syntax:

acl: 
  admin:
     user:
       - "me" : "my.server.tld"

access:
  register:
    admin: allow
    all: deny

and it works.

Upvotes: 0

Related Questions