Fix local users ACL

This commit is contained in:
Daniel Berteaud 2012-11-30 12:14:31 +01:00
parent 4d19103c0a
commit edfa31a9eb
2 changed files with 16 additions and 6 deletions

View File

@ -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";
}

View File

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