Fix local users ACL
This commit is contained in:
parent
4d19103c0a
commit
edfa31a9eb
|
@ -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…
Reference in New Issue