Skip to content

Fire webhook when updating or removing a group member

Serena Fang requested to merge 276499-group-webhook-for-members-edit-remove into master

What does this MR do?

Fire webhook when a user's role is updated, when their expiration date is changed, or when they're removed from the group.

Webhook output:

Update:

{
  "created_at": "2020-12-17T01:49:42Z",
  "updated_at": "2020-12-17T02:04:08Z",
  "group_name": "webhook-test",
  "group_path": "webhook-test",
  "group_id": 144,
  "user_username": "lueilwitz_ana",
  "user_name": "Ana Lueilwitz",
  "user_email": "fabiola_lowe@leannon.biz",
  "user_id": 79,
  "group_access": "Reporter",
  "expires_at": "2020-12-26T00:00:00Z",
  "group_plan": null,
  "event_name": "user_update_for_group"
}

Remove:

{
  "created_at": "2020-12-11T04:57:22Z",
  "updated_at": "2020-12-11T04:57:22Z",
  "group_name": "webhook-test",
  "group_path": "webhook-test",
  "group_id": 144,
  "user_username": "betsy_kilback",
  "user_name": "Betsy Kilback",
  "user_email": "brandy_jaskolski@konopelskischneider.ca",
  "user_id": 64,
  "group_access": "Guest",
  "expires_at": "2020-12-30T00:00:00Z",
  "group_plan": null,
  "event_name": "user_remove_from_group"
}

Screenshots (strongly suggested)

Screenshot_from_2020-12-21_14-26-41

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #276499 (closed)

Edited by Serena Fang

Merge request reports

Loading