Background context
When handling creation of new users where an agencyCloudNegId claim has been provided, we should automatically assign the agencyCloud product to that user
Specification
Project: Internal user service
In CreateUserCommandHandler, check whether or not the agencyCloudNegotiatorId property is set OR if there is an agencyCloudNegId claim. If there is, when creating the user also create a UserProducts entity to setup the relationship between the new user and that product
In UpdateUserCommandHandler, check whether or not an agencyCloudNegotiatorId is being set for the first time. If it is, create a UserProducts entity to setup the relationship between the new user and that product
In the handlers for PUT/DELETE user claims, build similar logic to determine whether or not the user product relationship should be modified.
Note that longer term product assignment will be done explicitly from the POST/DELETE user product endpoints, but until applications are amended to talk directly to our internal user service we need to build this logic into the handlers themselves. This can probably all be managed by a single method on the User entity.
Background context When handling creation of new users where an agencyCloudNegId claim has been provided, we should automatically assign the agencyCloud product to that user
Specification