-
Notifications
You must be signed in to change notification settings - Fork 0
Fix ModifyDN access check #932
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adjusts LDAP ModifyDN authorization and related ORM loading so ModifyDN operations can correctly evaluate access control entries (ACEs) for rename and move scenarios.
Changes:
- Refactors
AccessManager.mutate_query_with_ace_loadto build loader options more flexibly and eager-load additional ACE relations. - Updates ModifyDN handling to differentiate rename vs move-to-new-superior, adding explicit rename and delete checks and refactoring ACE membership update logic into helpers.
- Adds eager-loading of
Directory.entity_typein the Delete request query.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| app/ldap_protocol/roles/access_manager.py | Refactors ACE loader option construction and changes what related ACE data is always eager-loaded. |
| app/ldap_protocol/ldap_requests/modify_dn.py | Adds/changes ModifyDN access checks (rename vs move) and refactors ACE cleanup/update logic into helper methods. |
| app/ldap_protocol/ldap_requests/delete.py | Adds eager loading of Directory.entity_type in delete query options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Задача: 1256
Изменения:
nameдля ModifyDN запроса переименования (без перемещения).ACEдобавлена подгрузка EntityType, его авто-подгрузку в какой-то момент убрали и забыли добавить вручную.