| 1234567891011121314151617181920212223242526272829303132 |
- %%--------------------------------------------------------------------
- %% -type(ipaddr() :: {ipaddr, string()}).
- %%
- %% -type(ipaddrs() :: {ipaddrs, [string()]}).
- %%
- %% -type(username() :: {user | username, string()} | {user | username, {re, regex()}}).
- %%
- %% -type(clientid() :: {client | clientid, string()} | {client | clientid, {re, 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(), action(), topics()} | {permission(), all}).
- %%--------------------------------------------------------------------
- {allow, {username, {re, "^dashboard$"}}, subscribe, ["$SYS/#"]}.
- {allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
- {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
- {allow, all}.
|