chore(acl): fully match `dashboard` username
Co-authored-by: Ilya Averyanov <av@rubybox.dev>
This commit is contained in:
parent
5b9867dc13
commit
b059bad08a
|
@ -23,7 +23,7 @@
|
||||||
%% -type(rule() :: {permission(), who(), access(), topics()} | {permission(), all}).
|
%% -type(rule() :: {permission(), who(), access(), topics()} | {permission(), all}).
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
{allow, {username, {re, "^dashboard?"}}, subscribe, ["$SYS/#"]}.
|
{allow, {username, {re, "^dashboard$"}}, subscribe, ["$SYS/#"]}.
|
||||||
|
|
||||||
{allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
|
{allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Fix the incorrect default ACL rule, which was:
|
Fix the incorrect default ACL rule, which was:
|
||||||
```
|
```
|
||||||
{allow, {username, "^dashboard?"}, subscribe, ["$SYS/#"]}.
|
{allow, {username, "^dashboard$"}, subscribe, ["$SYS/#"]}.
|
||||||
```
|
```
|
||||||
|
|
||||||
However, it should use `{re, "^dashboard?"}` to perform a regular expression match:
|
However, it should use `{re, "^dashboard$"}` to perform a regular expression match:
|
||||||
```
|
```
|
||||||
{allow, {username, {re,"^dashboard?"}}, subscribe ,["$SYS/#"]}.
|
{allow, {username, {re,"^dashboard?"}}, subscribe ,["$SYS/#"]}.
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
修复错误的默认 ACL 规则,之前是:
|
修复错误的默认 ACL 规则,之前是:
|
||||||
```
|
```
|
||||||
{allow, {username, "^dashboard?"}, subscribe, ["$SYS/#"]}.
|
{allow, {username, "^dashboard$"}, subscribe, ["$SYS/#"]}.
|
||||||
```
|
```
|
||||||
但执行正则表达式的匹配应该使用 `{re, "^dashboard?”}`:
|
但执行正则表达式的匹配应该使用 `{re, "^dashboard?”}`:
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue