-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Onboarding #1058
User Onboarding #1058
Conversation
Handle old user logins Many bug fixes Cleanup and refactor code
07ba106
to
4a5b01d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just a few things that I would change before merging.
- The database we are using has support for array field types. I would recommend using that instead of a CSV string of numbers for the database changes, unless you think it would be too much of a performance cost.
- It would be nice to have screenshots of the UI changes. I would look at the UI myself, but I don't want to lose the data I have locally from testing product builds.
- This does not need to be in this PR, but this PR could still potentially be a good place to handle locked users (see my TODO note in
/users/+page.server.ts
).
source/SIL.AppBuilder.Portal/common/prisma/migrations/6_org_invites/migration.sql
Outdated
Show resolved
Hide resolved
source/SIL.AppBuilder.Portal/common/databaseProxy/OrganizationMemberships.ts
Outdated
Show resolved
Hide resolved
source/SIL.AppBuilder.Portal/src/routes/(authenticated)/users/invite/+page.svelte
Outdated
Show resolved
Hide resolved
...Builder.Portal/src/routes/(unauthenticated)/invitations/organization-membership/+page.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration script does not reflect the update from string to int array in the schema. You will want to fix this before merging.
@7dev7urandom The section for assigned groups, it needs to be able to handle lots of groups with long titles. Here is the list for Kalaam (who would most likely use this feature: "IPS Bangladesh" |
Remove unnecessary components from project view
OrganizationMembershipInvites
to include roles and groups to assign to the new memberThe flow is handled as follows (which is slightly different than described to @chrisvire originally):
a. exist in the database and be a member of an organization -> standard login
b. have a valid invite token as a cookie -> redirected to invite acceptance page
a. The user goes to the page /invitations/organization-membership?t=INVITE-TOKEN-UUID-V4
b. If they are logged in already (they are already a user on the site and a member of some other organization) they are immediately added, otherwise:
c. The invite token is saved as a browser cookie and the user is redirected to the login page
d. The user logs in and is redirected back to the invitation page, where the cookie is cleared and the user creation (if applicable) and organization membership are created, along with corresponding groups and roles
Note: schema.prisma is modified by this PR. Don't forget to apply the migration.