Skip to content

feature/DN-3759#187

Open
codure wants to merge 21 commits into
mainfrom
feature/DN-3759
Open

feature/DN-3759#187
codure wants to merge 21 commits into
mainfrom
feature/DN-3759

Conversation

@codure

@codure codure commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Jira: DN-3759

Comment thread Examples/Projects/Context/Entity.yaml Outdated
type: String! No newline at end of file
type: String!

- name: ConfidentialAdviser

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adviser or Advisor? 😊

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ye olde "en vs us". I'll vote for Advisor.

[FromBody] UpdateUserEmailDto dto,
CancellationToken ct)
{
await rightsService.EnsureAuthorizedForAction(RoleAction.Edit);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly needs to be updated here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants