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

fix(user_ldap): retrieve from LDAP first "email shaped" value instead of first value #49316

Closed
wants to merge 2 commits into from

Conversation

Thatoo
Copy link
Contributor

@Thatoo Thatoo commented Nov 15, 2024

retrieve from LDAP first "email shaped" value instead of first value

Summary

TODO

  • ...

Checklist

retrieve first "email shaped" value instead of first value

Signed-off-by: Thatoo <Thatoo@users.noreply.github.com>
@solracsf solracsf added this to the Nextcloud 31 milestone Nov 16, 2024
@solracsf solracsf added 3. to review Waiting for reviews feature: ldap labels Nov 16, 2024
@solracsf solracsf changed the title Update User.php fix(user_ldap): retrieve from LDAP first "email shaped" value instead of first value Nov 16, 2024
@solracsf solracsf requested a review from come-nc November 16, 2024 07:22
@Thatoo
Copy link
Contributor Author

Thatoo commented Nov 16, 2024

Thank you @solracsf .
Would you mind translate me what these checking error mean and what I can do to solve them?

Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

It makes sense, it seems the User class is not doing any additional check on the email address being set.

@come-nc
Copy link
Contributor

come-nc commented Nov 18, 2024

See https://www.conventionalcommits.org/en/v1.0.0/ for conventional commits ref.
For cypress and performance I think they always fail on PR from forks.

What I’m wondering is whether it would not make sense to instead import all values as email addresses into the profile, as there can be multiple in there, and log a warning when a value is not a valid email address.
I fail to see what the usecase is for a field where only some values are set as email address, can you enlighten me @Thatoo ?

@Thatoo
Copy link
Contributor Author

Thatoo commented Nov 18, 2024

I'll check your link about conventional commits ref.

It is indeed a good idea to retrieve all email shaped values instead of only the first one but I'm not sure how to do so then.

I fail to see what the usecase is for a field where only some values are set as email address, can you enlighten me @Thatoo ?

Well, I can take the example that lead me to this PR : In Yunohost LDAP, the first value of the LDAP forward mail category corresponds to the user's name, because the aim, when an e-mail is sent to camille@domaine.tld, is to actually deliver this e-mail to camille (without @domaine.tld), which corresponds to the local user, i.e. the yunohost mailbox, and also to the forward address. So all values from the second value have an email shaped value but not the first one. That's how the idea of this PR came to my mind.

@Thatoo
Copy link
Contributor Author

Thatoo commented Nov 20, 2024

I created this new PR to answer the conventional commits ref issue of my first (this) PR.
#49404

If it is ok, then we can close this one I guess.

@solracsf
Copy link
Member

Well, you could just ammend this PR, not create a new one... 😿

@solracsf solracsf closed this Nov 21, 2024
@solracsf solracsf removed this from the Nextcloud 31 milestone Nov 21, 2024
@Thatoo
Copy link
Contributor Author

Thatoo commented Nov 21, 2024

I didn't find how to modify a commit in Github. I didn't want to clone this repo into my computer for so little and meaningless change (just satisfying a normative way of writing) as this repo is very massive (big download = carbon impact).
Three ways were then possible :

  • accepting the PR with no normative way of writing but I didn't have the will to argue on that, we (human) get used to bend in front of fatality of computing (companies and states are slaving us a little more everyday to obey and fit the cell/box).
  • github would have offer a quick way for me to obey and rewrite my commit.
  • open a new PR and close this one : much easier, faster, less carbon impacting and I could do that freely so that's why I choose to do so.

@come-nc
Copy link
Contributor

come-nc commented Nov 25, 2024

I didn't find how to modify a commit in Github. I didn't want to clone this repo into my computer for so little and meaningless change (just satisfying a normative way of writing) as this repo is very massive (big download = carbon impact). Three ways were then possible :

  • accepting the PR with no normative way of writing but I didn't have the will to argue on that, we (human) get used to bend in front of fatality of computing (companies and states are slaving us a little more everyday to obey and fit the cell/box).
  • github would have offer a quick way for me to obey and rewrite my commit.
  • open a new PR and close this one : much easier, faster, less carbon impacting and I could do that freely so that's why I choose to do so.

I missed that this PR was open through github UI, you cannot force-push in this case?

@Thatoo
Copy link
Contributor Author

Thatoo commented Nov 25, 2024

I don't think so, never find how.

Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Successfully merging this pull request may close these issues.

3 participants