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

Fixes #37767 - Fixes User search filter for 'auth_source_type'. #10293

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

Manisha15
Copy link
Contributor

@Manisha15 Manisha15 commented Aug 28, 2024

If LDAP Authentication source is added in Administer > Authentication Sources then User search filter fails for auth_source_type as it cannot find attributes to set default values for them. Since LDAP auth source is not initialized in User page it fails the condition set_defaults after initialize. To prevent this, set defaults only if its a new record and not when there already exists some AuthSourceLdap object.

@Manisha15
Copy link
Contributor Author

test failures are unrelated.

@sbernhard
Copy link
Contributor

Similar to

after_initialize :set_current_taxonomy
in which
if new_record? && errors.empty?
new_record? is checked, too.

Thanks @Manisha15

@sbernhard sbernhard merged commit 10f7610 into theforeman:develop Sep 2, 2024
47 of 52 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