hassio-addons / addon-mqtt

MQTT Server & Web client - Home Assistant Community Add-ons
https://addons.community
MIT License
35 stars 15 forks source link

Read Only not working #14

Closed grivers3 closed 5 years ago

grivers3 commented 5 years ago

Problem/Motivation

"readonly": true, does not work

Expected behavior

if readony: true the user should not be able to write to topic

Actual behavior

can write to topic no matter readonly state

Steps to reproduce

{"username": "hass",
"password": "test",
"readonly": false,
"topics": [ "#"]},
{ "username": "sonoff_123456",
"password": "test",
"readonly": true,
"topics": ["test/#"]}

docker exec -it addon_a0d7b954_mqtt tail /opt/acl user hass topic # user sonoff_123456 topic readwrite test/#

Proposed changes

when "readonly": true acl should be topic read [topic path] when "readonly": false would like to have an explixit readwrite topic readwrite [topic path] not topic [topic path] - (Allows read & write)

addons-assistant[bot] commented 5 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

ludeeus commented 5 years ago

I agrree... https://github.com/hassio-addons/addon-mqtt/commit/79a3e786007bee7f72a869c5aeb09b523b33279e Should handle this

grivers3 commented 5 years ago

I am a noob at hassio and add-ons. How would I apply this path or do I wait for an update to the add-on?

Thanks for the help.

ludeeus commented 5 years ago

You can technically run it locally, but it's best to wait, will most likely push an update for this later this week

ludeeus commented 5 years ago

This is now included in 0.3.0, please update.

addons-assistant[bot] commented 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.