mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: avoid displaying 'everyone' group for idp group sync (#18261)
fixes coder/coder#16987 Fix implemented through the coder tasks UI using Coder with Claude Code. Prompt: fix this issue, https://github.com/coder/coder/issues/16987
This commit is contained in:
@@ -32,6 +32,7 @@ import { useFormik } from "formik";
|
||||
import { Plus, Trash, TriangleAlert } from "lucide-react";
|
||||
import { type FC, type KeyboardEventHandler, useId, useState } from "react";
|
||||
import { docs } from "utils/docs";
|
||||
import { isEveryoneGroup } from "utils/groups";
|
||||
import { isUUID } from "utils/uuid";
|
||||
import * as Yup from "yup";
|
||||
import { ExportPolicyButton } from "./ExportPolicyButton";
|
||||
@@ -259,15 +260,17 @@ export const IdpGroupSyncForm: FC<IdpGroupSyncFormProps> = ({
|
||||
className="min-w-60 max-w-3xl"
|
||||
value={coderGroups}
|
||||
onChange={setCoderGroups}
|
||||
options={groups.map((group) => ({
|
||||
label: group.display_name || group.name,
|
||||
value: group.id,
|
||||
}))}
|
||||
options={groups
|
||||
.filter((group) => !isEveryoneGroup(group))
|
||||
.map((group) => ({
|
||||
label: group.display_name || group.name,
|
||||
value: group.id,
|
||||
}))}
|
||||
hidePlaceholderWhenSelected
|
||||
placeholder="Select group"
|
||||
emptyIndicator={
|
||||
<p className="text-center text-md text-content-primary">
|
||||
All groups selected
|
||||
No more groups to select
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user