Conversation
added 3 commits
January 30, 2026 16:33
milov-dmitriy
requested changes
Feb 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces automatic handling of the sAMAccountType attribute for core Active Directory entities (user, group, computer). The changes ensure that this attribute is automatically set during entity creation and backfilled for existing entities.
Changes:
- Added
SamAccountTypeenum with standard Active Directory values - Implemented automatic
sAMAccountTypeattribute assignment in add requests for users, groups, and computers - Created database migration to add
sAMAccountTypeto existing entities - Updated test data and added test coverage for the new functionality
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/enums.py | Defines new SamAccountType enum with AD account type constants |
| app/ldap_protocol/ldap_requests/add.py | Adds logic to automatically set sAMAccountType during entity creation |
| app/ldap_protocol/utils/queries.py | Updates group creation to use enum instead of hardcoded value |
| app/ldap_protocol/auth/use_cases.py | Updates user creation to include sAMAccountType attribute |
| app/constants.py | Replaces hardcoded values with enum references in setup data |
| tests/constants.py | Updates test fixtures to use enum values |
| tests/test_api/test_main/test_router/test_add.py | Adds test to verify automatic sAMAccountType assignment |
| app/alembic/versions/f4e6cd18a01d_add_samaccounttype.py | Migration to backfill sAMAccountType for existing entities |
| interface | Subproject commit update |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e references throughout the codebase
milov-dmitriy
approved these changes
Feb 3, 2026
rimu-stack
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.