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'; use esmith::AccountsDB;
% Local users: my $a = esmith::AccountsDB->open_ro();
{acl, local, {user_regexp, ""}}. my $users;
foreach $u ($a->activeUsers()) {
HERE $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'; $OUT =<<'HERE';
% Only smeusers can create pubsub nodes % Only smeusers can create pubsub nodes
{access, pubsub_createnode, [{allow, smeusers}]}. {access, pubsub_createnode, [{allow, local}]}.
HERE HERE
} }

Loading…
Cancel
Save