Disable registration access for virtual host

I have three virtual hosts, jabber.no, barmen.nu and krot.org. For the last one I want to disable registrations but keep the other open.

Is this possible in any way?

After a tip from legoscia we tried the following:

{acl, registration_allowed, {server, "jabber.no", "barmen.nu"}}.
{access, register, [{allow, registration_allowed}, {deny, all}]}.

But this just disabled all registration requests from my tests. The other way with making allow all and then a deny list made registraions open for all. So now I am open for ideas :)

Best regards
Stian B. Barmen
www.jabber.no

Syntax error

stian@jabber.ru wrote:

{acl, registration_allowed, {server, "jabber.no", "barmen.nu"}}.

You have to write that in two lines:

{acl, registration_allowed, {server, "jabber.no"}}.
{acl, registration_allowed, {server, "barmen.nu"}}.

As you wrote it, an error would be signalled while checking registration permissions, with a message showing in the log.

You could load mod_register

You could load mod_register to different virtual hosts with different options. Use

{host_config, "hostname", [{modules, [...]}]}.

config file entries for that.

There's a bug on host_config

The idea is good, but there is a bug (or misfeature) in host_config that will probably prevent this from working. Explanation: Bugzilla #241: New option host_config_add

Another option is to use

Another option is to use {host_config} for all virtual hosts and not to use global {modules} section at all.

it works! :)

I found a combo that works fine, thanks teo! :)

ACL:

{acl,registration_allowed,{server,"jabber.no"}},
{acl,registration_allowed,{server,"barmen.nu"}}

RULE:

{access,register,[{allow,registration_allowed},{deny,all}]}

I might have written sth. wrong the first time. At least now it works!

stian@jabber.ru wrote: I

stian@jabber.ru wrote:

I found a combo that works fine, thanks teo! :)

ACL:

{acl,registration_allowed,{server,"jabber.no"}},
{acl,registration_allowed,{server,"barmen.nu"}}

RULE:

{access,register,[{allow,registration_allowed},{deny,all}]}

I might have written sth. wrong the first time. At least now it works!

I tried filtering users that can only register.

I tried this:

ACCESS CONTROL LISTS:
{acl, registrar, {user, "jed", "hostname.somewhere.com"}}.

ACCESS RULE:
{access, register, [{allow,registrar},{deny,all}]}.

But it doesn't work.

I hope you guys have tried this, or do you have any ideas how to implement this?

A specific user or admin can only register.

Thank you.

Syndicate content