Fix local users ACL

tags/ipasserelle-im-0.2.18-1 0.2.6
Daniel Berteaud 12 years ago
parent 4d19103c0a
commit edfa31a9eb
  1. 20
      root/etc/e-smith/templates/etc/ejabberd/ejabberd.cfg/18LocalUsers
  2. 2
      root/etc/e-smith/templates/etc/ejabberd/ejabberd.cfg/20PubSubNodes

@ -1,7 +1,17 @@
% Local users
{
$OUT =<<'HERE';
% Local users:
{acl, local, {user_regexp, ""}}.
HERE
use esmith::AccountsDB;
my $a = esmith::AccountsDB->open_ro();
my $users;
foreach $u ($a->activeUsers()) {
$users .= ("\^" . $u->key() . '$|');
}
if (defined $users) {
chop $users;
$OUT .= '{acl, local, {user_regexp,"';
$OUT .= $users;
$OUT .= '"}}.';
$OUT .= "\n";
}
$OUT .= "\n";
}

@ -1,7 +1,7 @@
{
$OUT =<<'HERE';
% Only smeusers can create pubsub nodes
{access, pubsub_createnode, [{allow, smeusers}]}.
{access, pubsub_createnode, [{allow, local}]}.
HERE
}

Loading…
Cancel
Save