(ctx context.Context, dao meta.DAO, nodeId string)
| 59 | } |
| 60 | |
| 61 | func readableMetaForNode(ctx context.Context, dao meta.DAO, nodeId string) ([]*idm.UserMeta, error) { |
| 62 | subQA, _ := anypb.New(&idm.SearchUserMetaRequest{ |
| 63 | NodeUuids: []string{nodeId}, |
| 64 | }) |
| 65 | rq, _ := anypb.New(&service.ResourcePolicyQuery{ |
| 66 | Subjects: []string{"sub1"}, |
| 67 | Action: service.ResourcePolicyAction_READ, |
| 68 | }) |
| 69 | queryA := &service.Query{ |
| 70 | SubQueries: []*anypb.Any{subQA, rq}, |
| 71 | } |
| 72 | return dao.Search(ctx, queryA) |
| 73 | } |
| 74 | |
| 75 | func TestCrud(t *testing.T) { |
| 76 |