Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add display_name field to groups #8740

Merged
merged 20 commits into from
Aug 2, 2023
Merged

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jul 26, 2023

What this does

Adds an optional non-unique human friendly group name for display purposes. This is required for #8214. This essentially allows mapping a non-friendly group name to a friendly one at runtime, rather than OIDC_GROUP_MAPPING (which requires a restart).

This field defaults to the empty string (""). By default name is used as the display name. So this features changes nothing about how groups currently work.

If the display_name is set however, then that name takes priority for the UI.

This is a non-unique human friendly group name for display
purposes. This means a display name can be used instead of
using an environment var to remap groups with OIDC names to
Coder names. Now groups can retain the OIDC name for mapping,
and use a display name for display purposes.
@Emyrk Emyrk marked this pull request as ready for review August 1, 2023 16:24
@Emyrk Emyrk requested a review from sreya August 1, 2023 18:06
Copy link
Collaborator

@sreya sreya left a comment

Choose a reason for hiding this comment

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

Looks good overall, I don't see any tests in post/patch for enterprise/coderd though.

coderd/database/queries/groups.sql Outdated Show resolved Hide resolved
@Emyrk
Copy link
Member Author

Emyrk commented Aug 1, 2023

I'll add to the existing tests

@Emyrk Emyrk requested a review from sreya August 1, 2023 20:31
@Emyrk
Copy link
Member Author

Emyrk commented Aug 1, 2023

I added onto the existing patch/create tests.

Copy link
Collaborator

@sreya sreya left a comment

Choose a reason for hiding this comment

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

Would probably be good to add a test in cli too since we're supporting it there.

@Emyrk Emyrk merged commit 4c1e63a into main Aug 2, 2023
22 of 24 checks passed
@Emyrk Emyrk deleted the stevenmasley/group_display_name branch August 2, 2023 15:53
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants