diff --git a/policy.go b/policy.go index e2cacfc..a693cd0 100644 --- a/policy.go +++ b/policy.go @@ -327,8 +327,9 @@ func (ext *ACLExt) Field(name string) interface{} { } var ErrorSignalAction = Action{"ERROR_RESP"} +var ReadResultSignalAction = Action{"READ_RESULT"} var DefaultACLPolicies = []Policy{ - NewAllNodesPolicy(Actions{ErrorSignalAction}), + NewAllNodesPolicy(Actions{ErrorSignalAction, ReadResultSignalAction}), } func NewACLExt(policies ...Policy) *ACLExt { diff --git a/signal.go b/signal.go index d82f2c4..e910194 100644 --- a/signal.go +++ b/signal.go @@ -276,6 +276,10 @@ type ReadResultSignal struct { Extensions map[ExtType]map[string]interface{} `json:"extensions"` } +func (signal ReadResultSignal) Permission() Action { + return ReadResultSignalAction +} + func NewReadResultSignal(req_id uuid.UUID, node_type NodeType, exts map[ExtType]map[string]interface{}) ReadResultSignal { return ReadResultSignal{ BaseSignal: BaseSignal{