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: specify param names for Connection.search consistently #268

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Sep 16, 2024

Just small details that helps me read and understand this code base, and possibly others then.

@consideRatio consideRatio changed the title refactor: specify argument names consistently refactor: specify param names for Connection.search consistently Sep 16, 2024
@@ -397,7 +397,10 @@ def get_user_attributes(self, conn, userdn):
attrs = {}
if self.auth_state_attributes:
found = conn.search(
userdn, "(objectClass=*)", attributes=self.auth_state_attributes
search_base=userdn,
search_scope=ldap3.SUBTREE,
Copy link
Member Author

Choose a reason for hiding this comment

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

SUBTREE is the default value, specified explicitly as it were other places.

@@ -397,7 +397,10 @@ def get_user_attributes(self, conn, userdn):
attrs = {}
if self.auth_state_attributes:
found = conn.search(
userdn, "(objectClass=*)", attributes=self.auth_state_attributes
search_base=userdn,
Copy link
Member Author

Choose a reason for hiding this comment

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

Understanding that this param was search_base helped me understand things better.

@consideRatio consideRatio merged commit e7e5bfb into jupyterhub:main Sep 16, 2024
5 of 7 checks passed
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.

1 participant