* update

* update auth file

* fixbug
This commit is contained in:
joy.zhou authored and GitHub committed 2019-11-11 11:41:38 +08:00
1 parent 896769fd9d
commit 4c107c67ab
3 files changed
+8 -4

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ const (
PUB = "2"
)
func (b *Broker) CheckTopicAuth(action, username, topic string) bool {
func (b *Broker) CheckTopicAuth(action, clientID, username, ip, topic string) bool {
if b.auth != nil {
if strings.HasPrefix(topic, "$SYS/broker/connection/clients/") {
return true
@@ -25,7 +25,7 @@ func (b *Broker) CheckTopicAuth(action, username, topic string) bool {
topic = substr[2]
}
return b.auth.CheckACL(action, username, topic)
return b.auth.CheckACL(action, clientID, username, ip, topic)
}
return true