Added read result to default policy allow for all nodes

gql_cataclysm
noah metz 2023-07-31 19:22:33 -06:00
parent 3bc427f2a9
commit ed9c353b95
2 changed files with 6 additions and 1 deletions

@ -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 {

@ -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{