From 2f9320e2703483e99047a1b887cccf20e23b0fa5 Mon Sep 17 00:00:00 2001 From: Ery Lee Date: Fri, 27 Mar 2015 21:14:59 +0800 Subject: [PATCH] acl --- rel/files/acl.config | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/rel/files/acl.config b/rel/files/acl.config index a071ab12d..20cfa0257 100644 --- a/rel/files/acl.config +++ b/rel/files/acl.config @@ -1,7 +1,18 @@ -{allow, {ipaddr, "127.0.0.1"}, subscribe, "$SYS/#"}. -{deny, all, subscribe, "$SYS/#"}. + +{allow, {ipaddr, "127.0.0.1"}, subscribe, ["$SYS/#", "#"]}. + +{allow, {user, "testuser"}, subscribe, ["a/b/c", "d/e/f/#"]}. + +{allow, {user, "admin"}, pubsub, ["a/b/c", "d/e/f/#"]}. + +{allow, {client, "testClient"}, subscribe, ["testTopics/testClient"]}. + +{allow, all, subscribe, ["clients/$c"]}. + +{allow, all, subscribe, ["users/$u/#"]}. + +{deny, all, subscribe, ["$SYS/#", "#"]}. {allow, all}. -