| 288 | } |
| 289 | |
| 290 | func (hc *HTTPClient) RemoveUserFromGroup(userName, groupName string) error { |
| 291 | const query = `mutation updateUser($name: String!, $groupName: String!) { |
| 292 | updateUser(input: {filter: {name: {eq: $name}},remove: {groups: [{ name: $groupName }]}}) { |
| 293 | user { |
| 294 | name |
| 295 | groups { |
| 296 | name |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | }` |
| 301 | params := GraphQLParams{ |
| 302 | Query: query, |
| 303 | Variables: map[string]interface{}{ |
| 304 | "name": userName, |
| 305 | "groupName": groupName, |
| 306 | }, |
| 307 | } |
| 308 | _, err := hc.RunGraphqlQuery(params, true) |
| 309 | return err |
| 310 | } |
| 311 | |
| 312 | func (hc *HTTPClient) RemovePredicateFromGroup(group, predicate string) error { |
| 313 | const query = `mutation updateGroup($name: String!, $rules: [String!]!) { |