-
Notifications
You must be signed in to change notification settings - Fork 881
fix: assign new oauth users to default org #12145
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
60775a6
to
04c6149
Compare
f999de5
to
5322f4e
Compare
organization, _ := tx.GetDefaultOrganization(dbauthz.AsSystemRestricted(ctx)) | ||
|
||
// Add the user to the default organization. | ||
// Once multi-organization we should check some configuration to see | ||
// if we should add the user to a different organization. | ||
organizationID = organization.ID |
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.
This is annoyingly allowed to be uuid.Nil
in unit tests. I am not going to change the behavior here, but we should really fix that so we don't have an edge case living for the sake of tests.
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.
Fine not to fix here, but can we add a comment for the ignored err above (tx.GetDefaultOrganization
) about this? Comment is just a band-aid though, we definitely want to nip this in the bud before too long.
04c6149
to
7059828
Compare
5322f4e
to
ddb828c
Compare
aeb29f2
to
8f61a71
Compare
ddb828c
to
fc2fce2
Compare
This is not a final solution, as we eventually want to be able to map to different orgs. This makes it so multi-org does not break oauth/oidc.
fc2fce2
to
872f4a2
Compare
This reverts commit 872f4a2.
organization, _ := tx.GetDefaultOrganization(dbauthz.AsSystemRestricted(ctx)) | ||
|
||
// Add the user to the default organization. | ||
// Once multi-organization we should check some configuration to see | ||
// if we should add the user to a different organization. | ||
organizationID = organization.ID |
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.
Fine not to fix here, but can we add a comment for the ignored err above (tx.GetDefaultOrganization
) about this? Comment is just a band-aid though, we definitely want to nip this in the bud before too long.
Begins work on #11922
This is not a final solution, as we eventually want to be able to map to different orgs.
This PR just makes it so multi-org does not break oauth/oidc.