Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors several LDAP protocol helpers to improve encapsulation and align computer Kerberos principal handling with the sAMAccountName attribute, while doing a small pagination refactor and removing a now-unnecessary host_principal property.
Changes:
- Extracts a
_validate_queryhelper inPaginationResultto check thatSelectqueries have anorder_byclause. - Converts
ModifyRequest.old_valsinto a private Pydantic attribute_old_valsand slightly adjusts aModifyForbiddenErrormessage. - Updates computer add/delete flows to derive Kerberos principals from the
sAMAccountNameattribute, and removes theDirectory.host_principalproperty.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| interface | Updates the submodule pointer to a new commit, pulling in external changes. |
| app/ldap_protocol/utils/pagination.py | Adds a reusable _validate_query helper and reuses it in PaginationResult.get for order-by validation. |
| app/ldap_protocol/ldap_requests/modify.py | Switches the cached old-values store to a Pydantic PrivateAttr and tweaks an error message. |
| app/ldap_protocol/ldap_requests/delete.py | Changes computer principal deletion to use sAMAccountName-based host principals, with new error behavior when the attribute is missing. |
| app/ldap_protocol/ldap_requests/add.py | Sets sAMAccountName for computers earlier, threads it through to Kerberos principal creation, and adjusts default group / userAccountControl handling. |
| app/entities.py | Removes the now-unused host_principal property from Directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.