| 310 | } |
| 311 | |
| 312 | func (hc *HTTPClient) RemovePredicateFromGroup(group, predicate string) error { |
| 313 | const query = `mutation updateGroup($name: String!, $rules: [String!]!) { |
| 314 | updateGroup(input: {filter: {name: {eq: $name}},remove: {rules: $rules}}) { |
| 315 | group { |
| 316 | name |
| 317 | rules { |
| 318 | predicate |
| 319 | permission |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | }` |
| 324 | params := GraphQLParams{ |
| 325 | Query: query, |
| 326 | Variables: map[string]interface{}{ |
| 327 | "name": group, |
| 328 | "rules": []string{predicate}, |
| 329 | }, |
| 330 | } |
| 331 | _, err := hc.RunGraphqlQuery(params, true) |
| 332 | return err |
| 333 | } |
| 334 | |
| 335 | func (hc *HTTPClient) UpdateGroup(name string, setRules []AclRule, removeRules []string) (*AclGroup, error) { |
| 336 | const query = `mutation updateGroup($name: String!, $set: SetGroupPatch, $remove: RemoveGroupPatch){ |