Use network name for mobile enrollments - #392
Conversation
| ), | ||
| ListTile( | ||
| title: Text('Enroll with defined.net'), | ||
| subtitle: Text('Join your organizations network'), |
There was a problem hiding this comment.
kinda meh on this one, but it matches our naming elsewhere. alternatively just s/organizations/organization's/
jasikpark
left a comment
There was a problem hiding this comment.
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
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. |
Matches DNClient behavior.