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: merge organization member db queries#13542

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 4 commits intomainfromstevenmasley/org_member_db
Jun 12, 2024

Conversation

Emyrk
Copy link
Member

Merge into 1 that also joins in the user table for username.
Required to list organization members on UI/cli

@EmyrkGraphite App
Copy link
MemberAuthor

Emyrk commentedJun 11, 2024
edited
Loading

@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch fromc739650 tob8eb28aCompareJune 11, 2024 15:04
Merge into 1 that also joins in the user table for username.Required to list organization members on UI/cli
@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch fromb8eb28a to4e1d469CompareJune 11, 2024 15:16
@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch 2 times, most recently frome2b5ca2 to13ed01dCompareJune 11, 2024 17:01
@EmyrkEmyrk marked this pull request as ready for reviewJune 11, 2024 17:25
@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch from13ed01d toe2b5ca2CompareJune 11, 2024 20:26
@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch frome2b5ca2 to8b1bc7fCompareJune 11, 2024 20:57
Comment on lines -1479 to -1485
func (q *querier) GetOrganizationMemberByUserID(ctx context.Context, arg database.GetOrganizationMemberByUserIDParams) (database.OrganizationMember, error) {
return fetch(q.log, q.auth, q.db.GetOrganizationMemberByUserID)(ctx, arg)
}

func (q *querier) GetOrganizationMembershipsByUserID(ctx context.Context, userID uuid.UUID) ([]database.OrganizationMember, error) {
return fetchWithPostFilter(q.auth, policy.ActionRead, q.db.GetOrganizationMembershipsByUserID)(ctx, userID)
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Removed these, replaced with 1OrganizationMembers.

Comment on lines +320 to +326

// Optional override of the default error checks.
// By default, we search for the expected error strings.
// If these strings are present, these strings will be searched
// instead.
notAuthorizedExpect string
cancelledCtxExpect string
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This used to be done with a static list:

slice.Contains([]string{
"GetAuthorizedWorkspaces",
"GetAuthorizedTemplates",
},methodName) {

We should move to this new approach, which is much closer to the actual writing of the tests.

AND user_id = $2
LIMIT
1;
true
Copy link
Contributor

Choose a reason for hiding this comment

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

just for my understanding, why do we need to dowhere true and case instead of awhere case?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

You are right, we don't need thetrue and 👍

@EmyrkEmyrkforce-pushed thestevenmasley/org_member_db branch fromb98d06b to2542dcdCompareJune 12, 2024 18:38
@EmyrkEmyrk merged commitde9e688 intomainJun 12, 2024
27 checks passed
@EmyrkEmyrk deleted the stevenmasley/org_member_db branchJune 12, 2024 19:23
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 12, 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