LavinMQ::MQTT::PermissionService
Every change rebuilds the compiled state and publishes it with one reference assignment, so readers never see stale or partial state.
A topic is allowed only when a rule grants it. A vhost is still open by default: the DEFAULT_GROUP grants every user every topic, and the operator locks the vhost down by deleting or narrowing that group.
Constants
Constructors
Instance methods
Commit the group only when its name is free, so a concurrent create or import cannot be overwritten. Returns false when the name is taken.
Commit all imported groups together. Check existing names under the same lock as API edits. An import adds and replaces groups, it never deletes one.
Read the group and commit the change under one lock, so an edit that commits while the caller prepares its own change is not overwritten. The block returns nil to leave the group as it is. Returns false when no group has that name. The block runs with the lock held, so it must not call back into the service and it must not wait on IO.