fix(workspaces): stop filtering server list by active workspace in assignment dialog
The workspace edit dialog reused useServers(), which always sends the X-Active-Workspace header, so admins assigning servers to a workspace only ever saw servers already in the currently active workspace instead of the full list. apiClient now lets a caller override the header, and useServers(allWorkspaces) requests '0' (admin "show all") for that dialog.
This commit is contained in:
@@ -134,7 +134,9 @@ function EditWorkspaceDialog({
|
||||
const [description, setDescription] = useState(initialDescription);
|
||||
|
||||
const { data: workspace } = useWorkspace(workspaceId);
|
||||
const { data: allServers = [] } = useServers();
|
||||
// allWorkspaces: этот диалог назначает серверы рабочей области, поэтому
|
||||
// список не должен фильтроваться заголовком активной рабочей области.
|
||||
const { data: allServers = [] } = useServers({ allWorkspaces: true });
|
||||
const { data: allUsers = [] } = useUsers();
|
||||
const updateServers = useUpdateWorkspaceServers();
|
||||
const updateUsers = useUpdateWorkspaceUsers();
|
||||
|
||||
Reference in New Issue
Block a user