Invalid ACL SQL in document
- Dominant language
- HTML
- Stars
- 174
- Forks
- 293
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 127
Description
File: [/en_US/advanced/acl-mysql.md](https://docs.emqx.io/en/broker/v4.3/advanced/acl-mysql.html)
```sql
-- All users cannot subscribe to system topics
INSERT INTO mqtt_acl (allow, ipaddr, username, clientid, access, topic) VALUES (0, NULL, '$all', NULL, 1, '$SYS/#');
```
For the rule to work, the acl_query in the given doc should be
```sql
auth.pgsql.acl_query = select allow, ipaddr,'%u', clientid, access, topic from mqtt_acl where ipaddr = '%a' or username = '%u' or username = '$all' or clientid = '%c'
```
Instead of (notice the change in the select field `username`)
```sql
auth.pgsql.acl_query = select allow, ipaddr, username, clientid, access, topic from mqtt_acl where ipaddr = '%a' or username = '%u' or username = '$all' or clientid = '%c'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Open /en_US/advanced/acl-mysql.md and locate the documented acl_query beside the mqtt_acl example. Compare its SELECT fields with the working query in the issue, then update the documentation so the query matches the stated ACL rule. Done means the example uses the corrected username placeholder and remains valid SQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100