Skip to content

Use network name for mobile enrollments - #392

Open
johnmaguire wants to merge 1 commit into
mainfrom
network-name-in-mobile
Open

Use network name for mobile enrollments#392
johnmaguire wants to merge 1 commit into
mainfrom
network-name-in-mobile

Conversation

@johnmaguire

Copy link
Copy Markdown
Member

Matches DNClient behavior.

@johnmaguire
johnmaguire requested review from JackDoan and nbrownus July 31, 2026 16:41
),
ListTile(
title: Text('Enroll with defined.net'),
subtitle: Text('Join your organizations network'),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda meh on this one, but it matches our naming elsewhere. alternatively just s/organizations/organization's/

@jasikpark jasikpark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Verified the one sharp edge — at the pinned dnapi commit (c66f625d8dfd), ConfigMeta.Network is a value struct populated on every successful enroll, so meta.Network.Name is always safe to read and the empty-string fallback covers older responses cleanly.

note (non-blocking): Network renames still won't propagate — doUpdate/doConfigUpdate discard the returned meta and reuse the caller's siteName, so a site keeps its enroll-time name forever. That was already true with org names, but networks get renamed much more often than orgs, so the staleness is more likely to actually be noticed now. A follow-up could use the meta returned by DoUpdate/DoConfigUpdate to refresh the site name. (Existing enrolled sites also keep their org-derived names — only new enrollments pick up the network name.)

note (non-blocking): Orgs that never renamed their default network will now enroll mobile sites literally named "Network1", which is less informative than the org name it replaces. It matches DNClient, so consistency wins — but it nudges up the priority of DefinedNet/webclient#4055 (default network name is user-visible).

— Caleb + Cache

@johnmaguire

johnmaguire commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

note (non-blocking): Network renames still won't propagate — doUpdate/doConfigUpdate discard the returned meta and reuse the caller's siteName, so a site keeps its enroll-time name forever. That was already true with org names, but networks get renamed much more often than orgs, so the staleness is more likely to actually be noticed now. A follow-up could use the meta returned by DoUpdate/DoConfigUpdate to refresh the site name. (Existing enrolled sites also keep their org-derived names — only new enrollments pick up the network name.)

This was intentional - we allow mobile users to rename the site in the list, and don't want to overwrite their rename. We could invent more complicated logic, but that's out of scope of this PR.

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.

2 participants