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

feat: show organization name for groups on user profile#14448

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
aslilac merged 17 commits intomainfromuser-groups-with-org-display-name
Aug 29, 2024

Conversation

aslilac
Copy link
Member

@aslilacaslilac commentedAug 26, 2024
edited
Loading

Closes#14213

Show the organization the group is from on the user profile page for multi-org deployments

Copy link
Member

@EmyrkEmyrk left a comment
edited
Loading

Choose a reason for hiding this comment

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

Usesqlc.embed, and another idea is to ropeGetGroupByID andGetGroupsByOrgAndName into theGetGroups query.

It feels weird, but it guarantees 1fetch query on the backend, and therefore 1 grouptype.

I did this withOrganizationMembers and use a wrapper func to convert the:Many to:One query:

organizationMember,err:=database.ExpectOne(db.OrganizationMembers(ctx, database.OrganizationMembersParams{
OrganizationID:organization.ID,
UserID:user.ID,
}))

The alternative is making a view, but those are kinda a pain to maintain with migrations. I'll let you make that call based on where the types are used. It is just annoying to havedatabase.GetGroupRow anddatabase.Group types in the BE sometimes.

@aslilac
Copy link
MemberAuthor

another idea is to rope GetGroupByID and GetGroupsByOrgAndName into the GetGroups query.

I am not against this, but it sounds like it might be a little out of my comfort zone, and probably big enough for a PR of its own

Emyrk reacted with thumbs up emoji

@aslilac
Copy link
MemberAuthor

It is just annoying to have database.GetGroupRow and database.Group types in the BE sometimes.

Definitely agree. This is one of the reasons row-typing can be really nice on the backend, but we're not replacing Go anytime soon. :p

@aslilacaslilac marked this pull request as ready for reviewAugust 28, 2024 16:44
@aslilacaslilac requested a review fromEmyrkAugust 28, 2024 16:44
@aslilacaslilac requested a review fromEmyrkAugust 28, 2024 18:33
@aslilacaslilac merged commit49afab1 intomainAug 29, 2024
31 checks passed
@aslilacaslilac deleted the user-groups-with-org-display-name branchAugust 29, 2024 16:55
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Account settings page currently lists the current groups a user is in. Should either replace, or include which organizations
2 participants
@aslilac@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp