mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 20:27:12 +00:00
fix rotation account configured detection
This commit is contained in:
@@ -31,6 +31,8 @@ export const BasePamAccountSchemaWithResource = BasePamAccountSchema.extend({
|
|||||||
id: true,
|
id: true,
|
||||||
name: true,
|
name: true,
|
||||||
resourceType: true
|
resourceType: true
|
||||||
|
}).extend({
|
||||||
|
rotationCredentialsConfigured: z.boolean()
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ export const PostgresAccountForm = ({ account, resourceId, onSubmit }: Props) =>
|
|||||||
} else {
|
} else {
|
||||||
setRotationCredentialsConfigured(!!resource?.rotationAccountCredentials);
|
setRotationCredentialsConfigured(!!resource?.rotationAccountCredentials);
|
||||||
}
|
}
|
||||||
}, [account]);
|
}, [account, resource]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormProvider {...form}>
|
<FormProvider {...form}>
|
||||||
|
|||||||
+4
-1
@@ -22,7 +22,10 @@ export const RotateAccountFields = ({
|
|||||||
const rotationEnabled = watch("rotationEnabled");
|
const rotationEnabled = watch("rotationEnabled");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip content="The resource which owns this account does not have rotation credentials configured.">
|
<Tooltip
|
||||||
|
isDisabled={rotationCredentialsConfigured}
|
||||||
|
content="The resource which owns this account does not have rotation credentials configured."
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"flex h-9 w-fit items-center gap-3",
|
"flex h-9 w-fit items-center gap-3",
|
||||||
|
|||||||
Reference in New Issue
Block a user