Skip to content
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

feat: making role in organization as a required field #26205

Merged
merged 7 commits into from
Nov 15, 2024

Conversation

surbhi-posthog
Copy link
Contributor

@surbhi-posthog surbhi-posthog commented Nov 14, 2024

Problem

since we want to understand the type of users using our product, having the role information is crucial and we want to try to make it as a required field.

Changes

Comparison: Before vs. After

Before After
The role was optional Changes don't allow the user to proceed without adding in a role.
Before After

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

self-hosted

How did you test this code?

Tested locally after commenting out the signup reroute in sceneLogic.ts. I verified that a new user was created and could access their posthog account.

           // if (scene === Scene.Signup && preflight && !preflight.can_create_org) {
            //     // If user is on an already initiated self-hosted instance, redirect away from signup
            //     router.actions.replace(urls.login())
            //     return
            // }

NOTE:
ran DEBUG=1 CLOUD_DEPLOYMENT=1 bin/start to clear the authentication credential issue when there are more than one users created in the same flow

Copy link
Contributor

github-actions bot commented Nov 14, 2024

Size Change: 0 B

Total Size: 1.15 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.15 MB

compressed-size-action

Copy link
Contributor

@patricio-posthog patricio-posthog left a comment

Choose a reason for hiding this comment

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

Not a React expert, but it looks good to me :)

name: !name ? 'Please enter your name' : undefined,
role_at_organization: !role_at_organization ? 'Please select your role in the organization' : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, you're learning kea!

@zlwaterfield
Copy link
Contributor

@surbhi-posthog after you fix something feel free to re-request a review.

For the failed E2E test, click into it and see if it's related to your change, if not you can try to re-run as it may be a flakey test.

@surbhi-posthog
Copy link
Contributor Author

surbhi-posthog commented Nov 15, 2024

@zlwaterfield, i've added the changes to the cypress tests and they now pass. Could you take another look at this?

In the meantime, I'm fixing the xmlsec issue on my local and verifying if cleaning the volumes and containers in orbstack fixes the authentication credential issue.

Copy link
Contributor

@zlwaterfield zlwaterfield left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM.

@surbhi-posthog
Copy link
Contributor Author

surbhi-posthog commented Nov 15, 2024

I ran DEBUG=1 CLOUD_DEPLOYMENT=1 bin/start and cleared authentication credential issue

@surbhi-posthog surbhi-posthog merged commit 2b2e7e4 into master Nov 15, 2024
96 checks passed
@surbhi-posthog surbhi-posthog deleted the org_role_feature branch November 15, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants