Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Ldap] Add users extraFields in ldap component #31532

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

Merged
merged 1 commit into from
Jun 22, 2019

Conversation

Simperfit
Copy link
Contributor

@Simperfit Simperfit commented May 18, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #28873, #19329
License MIT
Doc PR todo when validated, before merge

As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.

Adding the wanted field in the user_metadata array transform them as field -> value in the metadata field of the user.

@Simperfit Simperfit force-pushed the feature/add-users-metadata-in-ldap branch from abf0a13 to 353adf8 Compare May 18, 2019 13:27
@nicolas-grekas nicolas-grekas added this to the next milestone May 20, 2019
@nicolas-grekas
Copy link
Member

What about naming this "extra_fields"? This doesn't look like metadata to me.

@Simperfit Simperfit changed the title [Ldap] Add users metadata in ldap component [Ldap] Add users extraFields in ldap component May 22, 2019
@Simperfit
Copy link
Contributor Author

done @nicolas-grekas

@Simperfit Simperfit force-pushed the feature/add-users-metadata-in-ldap branch 2 times, most recently from a8aad38 to 33988b1 Compare May 23, 2019 20:10
@nicolas-grekas nicolas-grekas changed the base branch from master to 4.4 June 2, 2019 20:11
@Simperfit
Copy link
Contributor Author

@fabpot this is ready

@csarrazi
Copy link
Contributor

LGTM 👍

@Simperfit Simperfit force-pushed the feature/add-users-metadata-in-ldap branch from 33988b1 to bcfff04 Compare June 22, 2019 08:34
@Simperfit
Copy link
Contributor Author

@fabpot PR updated

@fabpot
Copy link
Member

fabpot commented Jun 22, 2019

Thank you @Simperfit.

@fabpot fabpot merged commit bcfff04 into symfony:4.4 Jun 22, 2019
fabpot added a commit that referenced this pull request Jun 22, 2019
…fit)

This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add users extraFields in ldap component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo when validated, before merge <!-- required for new features -->

As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.

Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.

Commits
-------

bcfff04 [Ldap] Add users extra_fields in ldap component
@Simperfit Simperfit deleted the feature/add-users-metadata-in-ldap branch June 22, 2019 09:02
chalasr pushed a commit that referenced this pull request Jun 25, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] add return type declaration

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31532
| License       | MIT
| Doc PR        |

Commits
-------

9fe532d add return type declaration
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
chalasr added a commit that referenced this pull request Jun 10, 2020
This PR was squashed before being merged into the 4.4 branch (closes #37177).

Discussion
----------

[Ldap] fix refreshUser() ignoring extra_fields

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |no
| Tickets       | -
| License       | MIT
| Doc PR        | -

While #31532 introduced `extra_fields` in general, #32824 later added `LdapUser` & `LdapUserProvider` and ignored `extra_fields` on `refreshUser()`.

This PR fixes `refreshUser()` and adds a test which makes sure, that the refreshed ldap user doesn't lose its default values.

Commits
-------

cb8f129 [Ldap] fix refreshUser() ignoring extra_fields
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.

6 participants