-
Notifications
You must be signed in to change notification settings - Fork 3
Disable connection to unsupported IdP #172
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -102,9 +102,12 @@ export default function ConnectButton(props: Props) { | |||||||||||||||||||||
| data-target={`/mcp/projects/${props.projectName}/workspaces/${extractWorkspaceNameFromNamespace( | ||||||||||||||||||||||
| props.workspaceName, | ||||||||||||||||||||||
| )}/mcps/${props.controlPlaneName}/context/${context.name}`} | ||||||||||||||||||||||
| additionalText={ | ||||||||||||||||||||||
| currentContext === context.name ? '(default IdP)' : undefined | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| additionalText={`(${ | ||||||||||||||||||||||
| context.context.user === 'openmcp' | ||||||||||||||||||||||
| ? t('ConnectButton.defaultIdP') | ||||||||||||||||||||||
| : t('ConnectButton.unsupportedIdP') | ||||||||||||||||||||||
| })`} | ||||||||||||||||||||||
| disabled={context.context.user !== 'openmcp'} | ||||||||||||||||||||||
|
Comment on lines
+106
to
+110
|
||||||||||||||||||||||
| context.context.user === 'openmcp' | |
| ? t('ConnectButton.defaultIdP') | |
| : t('ConnectButton.unsupportedIdP') | |
| })`} | |
| disabled={context.context.user !== 'openmcp'} | |
| context.context.user === SYSTEM_IDP | |
| ? t('ConnectButton.defaultIdP') | |
| : t('ConnectButton.unsupportedIdP') | |
| })`} | |
| disabled={context.context.user !== SYSTEM_IDP} |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,7 +17,9 @@ import { | |||||||||
| ReadyStatus, | ||||||||||
| } from '../../../lib/api/types/crate/controlPlanes.ts'; | ||||||||||
| import { ListWorkspacesType } from '../../../lib/api/types/crate/listWorkspaces.ts'; | ||||||||||
| import { useApiResourceMutation } from '../../../lib/api/useApiResource.ts'; | ||||||||||
| import useResource, { | ||||||||||
| useApiResourceMutation, | ||||||||||
| } from '../../../lib/api/useApiResource.ts'; | ||||||||||
|
Comment on lines
+20
to
+22
|
||||||||||
| import useResource, { | |
| useApiResourceMutation, | |
| } from '../../../lib/api/useApiResource.ts'; | |
| import useResource from '../../../lib/api/useApiResource.ts'; |
Copilot
AI
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using // @ts-ignore to suppress type errors. Consider updating the type definitions for controlPlaneConfig.data.spec.authentication so you can safely access enableSystemIdentityProvider without ignoring TypeScript.
| // @ts-ignore | |
| !!controlPlaneConfig.data?.spec?.authentication | |
| !!(controlPlaneConfig.data as ControlPlaneConfigData)?.spec?.authentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the mcp resource and check the
spec.authentication.enableSystemIdentityProvider === trueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed as discussed