- Notifications
You must be signed in to change notification settings - Fork927
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
e000bd1
164f8d6
013b422
f3373d8
b5424ad
d0cf454
90643b5
ab2658f
2b231a5
7f147fc
98e249d
360d1a1
181a120
4447c81
d460922
c7a6ce8
5422157
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -22,32 +22,36 @@ LIMIT | ||
-- name: GetGroups :many | ||
SELECT | ||
sqlc.embed(groups), | ||
organizations.nameAS organization_name, | ||
organizations.display_nameAS organization_display_name | ||
FROM | ||
groups | ||
INNER JOIN | ||
organizationsONgroups.organization_id=organizations.id | ||
WHERE | ||
true | ||
AND CASE | ||
WHEN @organization_id:: uuid!='00000000-0000-0000-0000-000000000000'::uuid THEN | ||
groups.organization_id= @organization_id | ||
ELSE true | ||
END | ||
AND CASE | ||
-- Filter to only include groups a user is a member of | ||
WHEN @has_member_id::uuid!='00000000-0000-0000-0000-000000000000'::uuid THEN | ||
EXISTS ( | ||
SELECT | ||
1 | ||
FROM | ||
-- this view handles the 'everyone' group in orgs. | ||
group_members_expanded | ||
WHERE | ||
group_members_expanded.group_id=groups.id | ||
AND | ||
group_members_expanded.user_id= @has_member_id | ||
) | ||
ELSE true | ||
END | ||
aslilac marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
; | ||
-- name: InsertGroup :one | ||
@@ -70,15 +74,15 @@ INSERT INTO groups ( | ||
id, | ||
name, | ||
organization_id, | ||
source | ||
) | ||
SELECT | ||
gen_random_uuid(), | ||
group_name, | ||
@organization_id, | ||
@source | ||
FROM | ||
UNNEST(@group_names ::text[])AS group_name | ||
-- If the name conflicts, do nothing. | ||
ON CONFLICT DO NOTHING | ||
RETURNING*; | ||
aslilac marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@@ -113,5 +117,3 @@ DELETE FROM | ||
groups | ||
WHERE | ||
id= $1; | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.