Skip to content

Conversation

@Misha-Shvets
Copy link
Collaborator

@Misha-Shvets Misha-Shvets commented Jan 30, 2026

  • Доработан атрибут для базовых сущностей(user, group, computer) SamAccountType
  • Автоматическая простанковка в add request
  • добавлен enum SamAccountType

@milov-dmitriy milov-dmitriy self-requested a review February 3, 2026 09:37
@milov-dmitriy milov-dmitriy requested a review from Copilot February 3, 2026 11:14
Copy link
Contributor

Copilot AI left a 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 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 SamAccountType enum with standard Active Directory values
  • Implemented automatic sAMAccountType attribute assignment in add requests for users, groups, and computers
  • Created database migration to add sAMAccountType to 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.

@rimu-stack rimu-stack merged commit a0a88be into dev Feb 3, 2026
6 checks passed
@rimu-stack rimu-stack deleted the add_samaccounttype_1029 branch February 3, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants