%%-------------------------------------------------------------------- %% -type(ipaddress() :: {ipaddress, string() | [string()]}) %% %% -type(username() :: {username, regex()}) %% %% -type(clientid() :: {clientid, regex()}) %% %% -type(who() :: ipaddress() | username() | clientid() | %% {'and', [ipaddress() | username() | clientid()]} | %% {'or', [ipaddress() | username() | clientid()]} | %% all). %% %% -type(action() :: subscribe | publish | all). %% %% -type(topic_filters() :: string()). %% %% -type(topics() :: [topic_filters() | {eq, topic_filters()}]). %% %% -type(permission() :: allow | deny). %% %% -type(rule() :: {permission(), who(), access(), topics()}). %%-------------------------------------------------------------------- {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}. {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}. {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}. {allow, all}.