Skip to content

Update domain controller sAMAccountName value#957

Merged
Naksen merged 1 commit intodevfrom
bugfix/fix_domain_controller_samaccountname
Mar 5, 2026
Merged

Update domain controller sAMAccountName value#957
Naksen merged 1 commit intodevfrom
bugfix/fix_domain_controller_samaccountname

Conversation

@Naksen
Copy link
Collaborator

@Naksen Naksen commented Mar 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 5, 2026 10:36
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

Updates domain controller naming to consistently use the host’s short name (pre-FQDN dot) via a new computed setting, avoiding dotted values in places like sAMAccountName.

Changes:

  • Added Settings.HOST_MACHINE_SHORT_NAME computed field derived from HOST_MACHINE_NAME.
  • Switched domain controller name / sAMAccountName writes to use HOST_MACHINE_SHORT_NAME during initial setup and DC creation script.
  • Updated the existing Alembic migration that creates the “Domain Controllers” OU to also use HOST_MACHINE_SHORT_NAME.

Reviewed changes

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

File Description
app/ldap_protocol/auth/use_cases.py Uses short host name when creating the initial Domain Controller directory + sAMAccountName.
app/extra/scripts/add_domain_controller.py Uses short host name for DC directory name and related attributes when adding DC post-setup.
app/config.py Introduces HOST_MACHINE_SHORT_NAME computed field.
app/alembic/versions/ebf19750805e_add_domain_controllers_ou.py Updates OU/DC creation logic in an existing migration to use the short host name.

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

@Naksen Naksen changed the title fix: update domain controller name references to use HOST_MACHINE_SHO… Update domain controller sAMAccountName value Mar 5, 2026
@Naksen Naksen merged commit 6b4e8d5 into dev Mar 5, 2026
10 checks passed
@Naksen Naksen deleted the bugfix/fix_domain_controller_samaccountname branch March 5, 2026 10:58
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.

3 participants