Skip to content

Add Domain Controller#938

Open
Naksen wants to merge 19 commits intodevfrom
feature/1121_add_instance_record
Open

Add Domain Controller#938
Naksen wants to merge 19 commits intodevfrom
feature/1121_add_instance_record

Conversation

@Naksen
Copy link
Collaborator

@Naksen Naksen commented Feb 17, 2026

Зачача: 1121

Изменения:

  • Добавлена миграция с созданием OU Domain Controllers.
  • Добавлена OU Domain Controllers в первоначальную настройку.
  • Добавлена переодическая задача с созданием контроллера домена.
  • Добавлено создание контроллера домена в первоначальной настройке.
  • Добавлен параметр DEFAULT_NAMESERVER. Он используется для атрибута ipHostNumber контроллера домена.
  • Флаг is_system был перенесен из безусловного проставления в setup_gateway в словарь для добавления директории. Необходимо, потому что во время первоначальной настройки необходимо добавить НЕ системную запись контроллера домена.
  • Обновлена типизация в AsyncTTLCache, чтобы линтер видел, что get_base_directories возвращает именно list[Directory], а не Any.

Copilot AI review requested due to automatic review settings February 17, 2026 10:06
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 adds support for a Domain Controllers OU and automatic domain controller creation, both during initial setup and via a periodic scheduled task.

Changes:

  • Add Domain Controllers OU name constant and an Alembic migration to create the OU if missing.
  • Extend initial setup to create Domain Controllers OU and an initial DC1 computer entry.
  • Add a scheduled task (add_domain_controller) and configuration (DEFAULT_NAMESERVER) to create additional domain controller entries.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
local.env Adds DEFAULT_NAMESERVER required by DC creation logic.
app/config.py Introduces Settings.DEFAULT_NAMESERVER used by setup/scripts.
app/constants.py Adds DOMAIN_CONTROLLERS_OU_NAME constant.
app/ldap_protocol/auth/use_cases.py Creates Domain Controllers OU + DC1 during initial setup using settings.
app/alembic/versions/ebf19750805e_add_domain_controllers_ou.py Migration to create Domain Controllers OU and inherit ACEs.
app/extra/scripts/add_domain_controller.py New periodic script to add DC computer entries under the OU.
app/schedule.py Registers add_domain_controller in scheduler task list.
app/ldap_protocol/utils/async_cache.py Tightens async cache decorator typing to awaitable callables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant