feat: backend support for creating and storing service accounts (#22698)

Add is_service_account column to users table with CHECK constraints
enforcing login_type='none' and empty email for service accounts.
Update user creation API to validate service account constraints.

Related to:
https://linear.app/codercom/issue/PLAT-27/feat-backend-support-for-creating-and-storing-service-accounts
This commit is contained in:
George K
2026-03-11 10:19:08 -07:00
committed by GitHub
parent e96cd5cbb2
commit e5c19d0af4
28 changed files with 522 additions and 87 deletions
+4
View File
@@ -2076,6 +2076,10 @@ export interface CreateUserRequestWithOrgs {
* OrganizationIDs is a list of organization IDs that the user should be a member of.
*/
readonly organization_ids: readonly string[];
/**
* Service accounts are admin-managed accounts that cannot login.
*/
readonly service_account?: boolean;
}
// From codersdk/workspaces.go