mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 17:26:19 +00:00
Fix api call to fetch the secret value, if there is a secret on the folder it should take precedence rather than an import secret
This commit is contained in:
+4
-2
@@ -82,6 +82,7 @@ type Props = {
|
|||||||
isImported: boolean;
|
isImported: boolean;
|
||||||
}[];
|
}[];
|
||||||
}[];
|
}[];
|
||||||
|
isSecretPresent?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SecretEditRow = ({
|
export const SecretEditRow = ({
|
||||||
@@ -101,7 +102,8 @@ export const SecretEditRow = ({
|
|||||||
isRotatedSecret,
|
isRotatedSecret,
|
||||||
importedBy,
|
importedBy,
|
||||||
importedSecret,
|
importedSecret,
|
||||||
isEmpty
|
isEmpty,
|
||||||
|
isSecretPresent
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { handlePopUpOpen, handlePopUpToggle, handlePopUpClose, popUp } = usePopUp([
|
const { handlePopUpOpen, handlePopUpToggle, handlePopUpClose, popUp } = usePopUp([
|
||||||
"editSecret"
|
"editSecret"
|
||||||
@@ -113,7 +115,7 @@ export const SecretEditRow = ({
|
|||||||
|
|
||||||
const [isFieldFocused, setIsFieldFocused] = useToggle();
|
const [isFieldFocused, setIsFieldFocused] = useToggle();
|
||||||
|
|
||||||
const fetchSecretValueParams = importedSecret
|
const fetchSecretValueParams = importedSecret && !isSecretPresent
|
||||||
? {
|
? {
|
||||||
environment: importedSecret.environment,
|
environment: importedSecret.environment,
|
||||||
secretPath: importedSecret.secretPath,
|
secretPath: importedSecret.secretPath,
|
||||||
|
|||||||
+1
@@ -284,6 +284,7 @@ export const SecretOverviewTableRow = ({
|
|||||||
environment={slug}
|
environment={slug}
|
||||||
isRotatedSecret={secret?.isRotatedSecret}
|
isRotatedSecret={secret?.isRotatedSecret}
|
||||||
importedBy={importedBy}
|
importedBy={importedBy}
|
||||||
|
isSecretPresent={Boolean(secret)}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user