[v13] Supporting changes for Cloud email invites (#32439)#34181
Merged
timothyb89 merged 2 commits intobranch/v13from Nov 13, 2023
Merged
[v13] Supporting changes for Cloud email invites (#32439)#34181timothyb89 merged 2 commits intobranch/v13from
timothyb89 merged 2 commits intobranch/v13from
Conversation
Backport of #32439 for branch/v13 --- * Add WIP implementation of Teleport email invites This adds a WIP impl of Teleport email invites. Requires a compatible Enterprise build and Cloud API. * Bump e ref and add new validation rule * Various improvements to enable Cloud email invites * Add description to UI role resources * Expose various new react-select options * Add new FieldSelectCreatable * Add some typing for validation rules * Tweak invite button for Cloud to use email UI instead of showing both buttons * Partial implementation for onboarding invites * Add support for Cloud collaborator invites during onboarding This adds various changes to enable showing the invite collaborators form during initial user onboarding. * Adds a `?initial` URL query parameter for the UI to signify the first user; Cloud will append this to invite appropriate invite links. * Added a new ratelimited public endpoint to return a list of preset roles. This just exposes static data available otherwise available in Git and that could be obtained from the public Teleport version shown in ping responses already. * Update e ref for the invite-collaborators branch * Honor the `inputId` parameter if set * bump e ref * Improve typing for `requiredEmailLike` to add a error category The `kind` field can allow the UI to group errors together if several invalid emails are entered. * bump e ref * Destructure the InviteCollaborators component sanely * Set `setDisplayInviteCollaborators` to `null` instead of `false` * Split `FieldSelectCreatable` into its own file * Fix lint * add story for SelectCreatable * Add tests for `requiredEmailLike` * Rename `initial` flag to `invite` Renaming the flag will hopefully clarify the intent. * Add tests for invite collaborators feedback and users rendering * Add rendering test for the invite collaborators card * Clean up lints * Rename types.tsx -> shared.tsx * Relocate invite constant to `Welcome/const.ts` * Split `SelectCreatable` into its own story * Clarify SelectCreatable story * Simplify story; fix lint * Fix type checker failure * Rename `preset-roles` endpoint to `presetroles` to follow API conventions
kimlisa
approved these changes
Nov 3, 2023
mcbattirola
approved these changes
Nov 3, 2023
zmb3
approved these changes
Nov 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #32439 for branch/v13
This adds a number of changes to support email user invites for Cloud.
/preset-rolesendpoint that just returns the preset roles for the current version of Teleport. It's unauthenticated and intended for use in the new onboarding invitation UI. I don't think this has security implications beyond what we already return in thepingreplies, since those include the Teleport version.react-selectwrapper, and adds a Creatable variant for email entry.requiresEmailLikevalidation rule, and adds more typing to the rulesNote that gravitational/teleport.e#2286 is needed to test the changes. This PR must be merged before the
teleport.ePR, then another PR here should bump the .e ref.See also: