Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 5 commits intomainfromstevenmasley/oauth_user
Feb 16, 2024
Merged

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedFeb 14, 2024
edited
Loading

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.

@EmyrkGraphite App
Copy link
MemberAuthor

Emyrk commentedFeb 14, 2024
edited
Loading

@EmyrkEmyrkforce-pushed thestevenmasley/post_user branch from60775a6 to04c6149CompareFebruary 14, 2024 18:08
@EmyrkEmyrkforce-pushed thestevenmasley/oauth_user branch fromf999de5 to5322f4eCompareFebruary 14, 2024 18:09
@EmyrkEmyrk changed the titlefix: new oauth users assigned to default orgfix: assign new oauth users to default orgFeb 14, 2024
Comment on lines +1346 to +1351
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
Copy link
MemberAuthor

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 beuuid.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.

mafredri reacted with thumbs up emoji
Copy link
Member

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.

Emyrk reacted with thumbs up emoji
@EmyrkEmyrk requested a review frommafredriFebruary 15, 2024 15:31
@EmyrkEmyrkforce-pushed thestevenmasley/post_user branch from04c6149 to7059828CompareFebruary 15, 2024 16:28
@EmyrkEmyrkforce-pushed thestevenmasley/oauth_user branch from5322f4e toddb828cCompareFebruary 15, 2024 16:28
@EmyrkEmyrkforce-pushed thestevenmasley/post_user branch 2 times, most recently fromaeb29f2 to8f61a71CompareFebruary 15, 2024 17:18
@EmyrkEmyrkforce-pushed thestevenmasley/oauth_user branch fromddb828c tofc2fce2CompareFebruary 15, 2024 17:58
This is not a final solution, as we eventually want to be ableto map to different orgs. This makes it so multi-org does not break oauth/oidc.
@EmyrkEmyrkforce-pushed thestevenmasley/oauth_user branch fromfc2fce2 to872f4a2CompareFebruary 15, 2024 18:46
Comment on lines +1346 to +1351
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
Copy link
Member

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.

Emyrk reacted with thumbs up emoji
Base automatically changed fromstevenmasley/post_user tomainFebruary 16, 2024 14:28
@EmyrkEmyrk merged commit75870c2 intomainFeb 16, 2024
@EmyrkEmyrk deleted the stevenmasley/oauth_user branchFebruary 16, 2024 14:47
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 16, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp