29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
%%--------------------------------------------------------------------
|
|
%% -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(), access(), topics()} | {permission(), all}).
|
|
%%--------------------------------------------------------------------
|
|
|
|
{allow, {username, "^dashboard?"}, subscribe, ["$SYS/#"]}.
|
|
|
|
{allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
|