feature/DN-3759#187
Conversation
# Conflicts: # Examples/Projects/Context/Entity.yaml # Examples/Projects/Project/Entity.yaml # UvA.Workflow.Api/Users/Dtos/UserDto.cs # UvA.Workflow.Api/WorkflowInstances/Dtos/WorkflowInstanceDto.cs # UvA.Workflow.Api/WorkflowInstances/Dtos/WorkflowInstanceDtoFactory.cs
| type: String! No newline at end of file | ||
| type: String! | ||
|
|
||
| - name: ConfidentialAdviser |
There was a problem hiding this comment.
Ye olde "en vs us". I'll vote for Advisor.
| [FromBody] UpdateUserEmailDto dto, | ||
| CancellationToken ct) | ||
| { | ||
| await rightsService.EnsureAuthorizedForAction(RoleAction.Edit); |
There was a problem hiding this comment.
I don't think this works; now you can either edit all users or none. Maybe this should take an instance ID and allow editing the email if you are authorized to edit that field in the instance?
Additionally, I guess it should also actually edit the instance data and not just the user record? Because we store the email in both places, I guess? (and that way we will also have audit logging and some of the existing SaveAnswer logic can be re-used)
There was a problem hiding this comment.
Check! Had a feeling this wasn't complete... It should definitely have the instance data updated as well. I'll make it a requirement as well as it should stay in sync, even if only visually.
| } | ||
|
|
||
| private async Task<ObjectResult?> ValidateEmail(string email, CancellationToken ct) | ||
| private async Task<ObjectResult?> ValidateEmail(string email, CancellationToken ct, string? ignoredUserId = null) |
There was a problem hiding this comment.
If you do the equality check first I think maybe you don't need the ignoredUserId here?
| if (updatedExternalUsers.Count == 0) | ||
| return; | ||
|
|
||
| UpdateInstanceUserProperties(instance, property, rawValue, updatedExternalUsers); |
There was a problem hiding this comment.
What exactly needs to be updated here?
Jira: DN-3759