浏览代码

small tweaks

0xdcarns 2 年之前
父节点
当前提交
61b5518144
共有 2 个文件被更改,包括 18 次插入1 次删除
  1. 0 1
      logic/nodes.go
  2. 18 0
      mq/dynsec_helper.go

+ 0 - 1
logic/nodes.go

@@ -91,7 +91,6 @@ func DeleteNode(node *models.Node, purge bool) error {
 		if err := UpdateNode(node, &newnode); err != nil {
 			return err
 		}
-		return nil
 	}
 	host, err := GetHost(node.HostID.String())
 	if err != nil {

+ 18 - 0
mq/dynsec_helper.go

@@ -178,6 +178,24 @@ func fetchHostAcls(hostID string) []Acl {
 			Priority: -1,
 			Allow:    true,
 		},
+		{
+			AclType:  "publishClientReceive",
+			Topic:    fmt.Sprintf("update/%s/#", hostID),
+			Priority: -1,
+			Allow:    true,
+		},
+		{
+			AclType:  "subscribePattern",
+			Topic:    "#",
+			Priority: -1,
+			Allow:    true,
+		},
+		{
+			AclType:  "unsubscribePattern",
+			Topic:    "#",
+			Priority: -1,
+			Allow:    true,
+		},
 	}
 }