Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle mail field #80

Merged
merged 5 commits into from
Mar 12, 2025
Merged

feat: handle mail field #80

merged 5 commits into from
Mar 12, 2025

Conversation

gsanchietti
Copy link
Member

@gsanchietti gsanchietti commented Mar 6, 2025

NethServer/dev#7229

NOTE: tests were already failing

@gsanchietti gsanchietti requested a review from Copilot March 11, 2025 16:46
@gsanchietti gsanchietti marked this pull request as ready for review March 11, 2025 16:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements handling for the mail field when editing or adding a user, updating the LDAP attributes accordingly.

  • In alter-user, the mail attribute is added or removed based on the request.
  • In add-user, the mail attribute is updated if provided.
  • In list-users, an extra_info flag is added to the user listing.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
imageroot/api-moduled/handlers/alter-user/post Adds mail field handling with conditional update/removal
imageroot/api-moduled/handlers/add-user/post Processes mail field from request and updates LDAP accordingly
imageroot/api-moduled/handlers/list-users/post Requests extra user info in the user listing

@gsanchietti gsanchietti force-pushed the mail_notify branch 3 times, most recently from b4b7628 to 0acf5a6 Compare March 12, 2025 15:56
Preserve existing behavior: if a field is not specified, it will not
be overwritten.
To remove a mail address, just pass an empty string as value
Note: a mail address with an aempty string is not allowed by AD
@gsanchietti gsanchietti merged commit 4799f6c into main Mar 12, 2025
2 of 5 checks passed
@gsanchietti gsanchietti deleted the mail_notify branch March 12, 2025 16:27
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.

2 participants