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

refactor: simplify {user,krbpolicy,pwpolicy}Utils #260

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

pvoborni
Copy link
Member

Added Datetime parser to ipaObjectUtils.convertApiObj so that it can converted attributes defined by dateValues.

With this it's no longer needed to use the datetime parsing in former objectToUser.

This and the fact that there is no usage of objectToUser with the second parameter, allowed to replace objectToUser with partialUserToUser and createEmptyUser functions that are much imore simpler and reusable.

The same for pw and krb policy objects.

Added Datetime parser to `ipaObjectUtils.convertApiObj` so that it
can converted attributes defined by `dateValues`.

With this it's no longer needed to use the datetime parsing in
former objectToUser.

This and the fact that there is no usage of `objectToUser` with the second
parameter, allowed to replace `objectToUser` with `partialUserToUser`
and `createEmptyUser` functions that are much imore simpler and reusable.

The same for pw and krb policy objects.

Signed-off-by: Petr Vobornik <pvoborni@redhat.com>
@carma12 carma12 self-requested a review January 26, 2024 09:31
Copy link
Collaborator

@carma12 carma12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@pvoborni pvoborni merged commit 86e84ec into freeipa:main Jan 26, 2024
3 checks passed
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