%%-------------------------------------------------------------------- %% -type(ipaddr() :: {ipaddr, string()}). %% %% -type(ipaddrs() :: {ipaddrs, string()}). %% %% -type(username() :: {username, regex()}). %% %% -type(clientid() :: {clientid, regex()}). %% %% -type(who() :: ipaddr() | ipaddrs() |username() | clientid() | %% {'and', [ipaddr() | ipaddrs()| username() | clientid()]} | %% {'or', [ipaddr() | ipaddrs()| 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, {username, "^dashboard?"}, subscribe, ["$SYS/#"]}. {allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.