feat: account provisioning and deprovisioning for Linear users#51
Conversation
Implements AccountManagerLimited via organizationInviteCreate (invite-based; returns ActionRequiredResult since the User only exists after the invitee accepts) and ResourceDeleterLimited via userSuspend (Linear's deprovisioning primitive — revokes access, invalidates sessions; Linear has no hard-delete). Role is read from the user_role profile field (admin/guest/user, matching Linear's lowercase UserRoleType enum); email is read from AccountInfo.Emails or Login.
Connector PR Review: feat: account provisioning and deprovisioning for Linear usersBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe new commits add comprehensive test coverage for the Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
httptest-based tests for CreateOrganizationInvite and SuspendUser, plus connector-level coverage of CreateAccount (email/login fallback, role filtering, ActionRequiredResult shape) and Delete (success, wrong resource type, success=false).
General PR Review: feat: account provisioning and deprovisioning for Linear usersBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThis PR adds Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
madison-c-evans
left a comment
There was a problem hiding this comment.
fix-ci-checks.md will help with ci issues
Summary
CreateAccounton the user resource type viaorganizationInviteCreate. The invitee must accept the workspace invite before a Linear User record exists, so the call returnsActionRequiredResultwith the invite ID in the message.Deleteon the user resource type viauserSuspend— Linear's deprovisioning primitive (revokes access, invalidates sessions). Linear has no user hard-delete;userUnsuspendreverses it.user_roleprofile field; valid values match Linear'sUserRoleTypeenum (lowercase:admin,guest,user). Defaults to Linear's server-side default when unset.Test plan
baton config create-account --login someone@example.comand confirm an invite email is sent + a pendingOrganizationInviteshows up in Linear's settings.--profile user_role=adminproduces an admin invite.CreateAccountreturns an error.baton config delete-resource user <id>suspends the user; their sessions are invalidated and they can no longer access the workspace.userUnsuspend(via Linear UI) restores the user.