open_social
open_social copied to clipboard
PROD-29995: Implement EDA event for when a user completes the process for account registration
Description
This pull request introduces the new EDA event "user created" which is dispatched to the Kafka topic com.getopensocial.cms.user.create
.
The event is triggered on the following conditions:
- When the user profile is inserted we send the event unless SCIM provisioning is enabled or unless "approval is required by administrator" is configured and this was a self sign-up
- When SCIM provisioning is completed
- When the account is approved by the administrator
Here's an example of the generated payload:
{
"specversion": "1.0",
"id": "53117d0c-72d3-4946-b3af-046d734d1060",
"source": "/admin/people/create",
"type": "com.getopensocial.cms.user.create",
"datacontenttype": "application/json",
"time": "2024-10-09T18:50:53Z",
"data": {
"user": {
"id": "60bb3249-0a59-4422-b899-87f05a3887c2",
"created": "2024-10-09T18:50:53",
"updated": "2024-10-09T18:50:53",
"status": "active",
"displayName": "test34",
"firstName": "",
"lastName": "",
"email": "[email protected]",
"roles": [
"authenticated",
"verified"
],
"timezone": "UTC",
"language": "en",
"address": {
"label": "",
"countryCode": "",
"administrativeArea": "",
"locality": "",
"dependentLocality": "",
"postalCode": "",
"sortingCode": "",
"addressLine1": "",
"addressLine2": ""
},
"phone": "",
"function": "",
"organization": "",
"href": {
"canonical": "http://cablecar.localhost/user/55/home"
}
},
"actor": {
"application": null,
"user": {
"id": "b0dc9a92-7e00-425d-a307-e6fb8418a69b",
"displayName": "admin",
"href": {
"canonical": "http://cablecar.localhost/user/1/home"
}
}
}
}
}
Issue tracker
https://getopensocial.atlassian.net/browse/PROD-29995
Theme issue tracker
N/A
How to test
- [ ] Checkout branch
issue/PROD-29995-eda-event-user-create
of 'open_social' - [ ] Enable the modules
social_eda
andsocial_eda_dispatcher
- [ ] Create user account as Admin
- [ ] Register as anonymous (when admin approval is not required)
- [ ] Register as anonymous, and approve as admin (when admin approval is required)
The message should be dispatched to Kafka. If you are running locally using the Docker containers, you should be able to see the message on the Kafka UI at http://localhost:8080.
Screenshots
Release notes
N/A
Change Record
N/A