Skip to content

feat: add support for creating service accounts#23140

Merged
aslilac merged 25 commits intomainfrom
lilac/create-service-accounts
Mar 17, 2026
Merged

feat: add support for creating service accounts#23140
aslilac merged 25 commits intomainfrom
lilac/create-service-accounts

Conversation

@aslilac
Copy link
Copy Markdown
Member

@aslilac aslilac commented Mar 16, 2026

For now we've decided to go with the approach of just replacing the "none" login type with a "service account" option. I don't think "login type" is really the right name for the selection anymore but it's what the designs say and I can't really think of anything better. Open to suggestions.

New user form:

Screenshot 2026-03-17 at 3 28 20 PM Screenshot 2026-03-17 at 3 28 50 PM

A service account in the users table:

Screenshot 2026-03-17 at 3 29 22 PM

@aslilac aslilac marked this pull request as ready for review March 17, 2026 20:05
@aslilac aslilac changed the title feat(site): add support for creating service account feat: add support for creating service accounts Mar 17, 2026
@coder-tasks
Copy link
Copy Markdown
Contributor

coder-tasks Bot commented Mar 17, 2026

Documentation Check

Updates Needed

  • docs/admin/users/headless-auth.md — The page still uses "headless user" / "headless user account" terminology throughout, but this PR renames the concept to Service Account in the UI (the none login type is now labeled "Service account"). The page title, content, and screenshot should be updated to match. The existing screenshot shows the old "None" login-type option; it will now show "Service account". Additionally, the page could note that email is now optional when creating service accounts.

    ⚠️ New context: the UI link to this doc page was removed in this PR, and is_service_account was added to the API response — users can no longer find the docs from the create-user form, making the page update more important.


Automated review via Coder Tasks

Copy link
Copy Markdown
Contributor

@DanielleMaywood DanielleMaywood left a comment

Choose a reason for hiding this comment

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

Left a comment on the storybook.

Also do we have a preference on enforcing React.useId() for IDs? I've noticed we have a few hardcoded IDs and I know we should be safe with them but just want to verify with you what the expectation there is.

Comment thread site/src/pages/CreateTemplatePage/CreateTemplateForm.stories.tsx Outdated
@@ -0,0 +1,67 @@
import {
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.

Do any of these make sense to be moved to stories instead?

Comment thread site/src/pages/CreateUserPage/CreateUserForm.tsx
Comment thread site/src/components/FormField/FormField.tsx
@aslilac
Copy link
Copy Markdown
Member Author

aslilac commented Mar 17, 2026

Also do we have a preference on enforcing React.useId() for IDs?

Ideally we'd always use useId, but at this point the practice of depending on specific IDs in tests has crept in pretty deep. I don't really know what the right way to solve all of it is at this point because it's so wide spread.

Copy link
Copy Markdown
Contributor

@DanielleMaywood DanielleMaywood left a comment

Choose a reason for hiding this comment

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

happy from my side

Copy link
Copy Markdown
Contributor

@jeremyruppel jeremyruppel left a comment

Choose a reason for hiding this comment

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

LGTM!

@aslilac aslilac merged commit 49e5547 into main Mar 17, 2026
36 checks passed
@aslilac aslilac deleted the lilac/create-service-accounts branch March 17, 2026 21:36
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants