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

chore: assign user to multiple orgs in coderdtest user create#13867

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 2 commits intomainfromstevenmasley/organization_member
Jul 10, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJul 10, 2024
edited
Loading

CreateAnotherUser can now assign users to multiple orgs. As I write multi-org tests, this is super useful to reduce LoC.

third := coderdtest.CreateOrganization(t, client, coderdtest.CreateOrganizationOptions{})

// Assign the user to 3 orgs in this 1 statement
_, user := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID, rbac.ScopedRoleOrgMember(second.ID), rbac.ScopedRoleOrgMember(third.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 the result of this change. This line creates a new user and assigns them to 3 organizations. Much easier than doing this manually.

@EmyrkEmyrk changed the titlechore: coderdtest assign user to multiple orgs on createchore: assign user to multiple orgs in coderdtest user createJul 10, 2024
@EmyrkEmyrk requested a review fromf0sselJuly 10, 2024 17:27
Log: api.Logger,
Request: r,
Action: database.AuditActionCreate,
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.

Noticed these org ID's were missing in the audit logs

Copy link
Contributor

@f0sself0ssel left a comment

Choose a reason for hiding this comment

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

great addition to the test suite

@EmyrkEmyrk merged commita588ec5 intomainJul 10, 2024
34 checks passed
@EmyrkEmyrk deleted the stevenmasley/organization_member branchJuly 10, 2024 17:38
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@f0sself0sself0ssel 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@f0ssel

[8]ページ先頭

©2009-2025 Movatter.jp