ansible / django-ansible-base

Apache License 2.0
18 stars 49 forks source link

Update LDAP user search test #620

Closed bhavenst closed 1 month ago

bhavenst commented 1 month ago

LDAP auth should require one of User Search or User DN Template, but not both. Currently LDAP auth is blocked if User Search is empty ([]), this change fixes this issue and allows auth when only User DN Template is specified.

This is for: https://issues.redhat.com/browse/AAP-28020

That Jira is now closed, but this is good to fix anyway.

tznamena commented 1 month ago

Shouldn't we add a test for this as well?

bhavenst commented 1 month ago

Yeah, was in progress.. Added a case for it now.

bhavenst commented 1 month ago

Oops, test didn't hit new code.. Standby..

bhavenst commented 1 month ago

OK, unit test added to cover this strange scenario.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud