mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 10:28:22 +00:00
Refactor secret path handling in InfisicalSecretInput to use folderPath directly, enhancing clarity in permission validation logic.
This commit is contained in:
@@ -387,8 +387,6 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const secretPath = segment === environmentSlug ? "/" : folderPath;
|
|
||||||
|
|
||||||
// Only validate secret permission, users can always view environments and folders
|
// Only validate secret permission, users can always view environments and folders
|
||||||
if (segment === secretName) {
|
if (segment === secretName) {
|
||||||
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
|
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
|
||||||
@@ -396,8 +394,8 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
ProjectPermissionSecretActions.ReadValue,
|
ProjectPermissionSecretActions.ReadValue,
|
||||||
{
|
{
|
||||||
environment: environmentSlug,
|
environment: environmentSlug,
|
||||||
secretPath,
|
secretPath: folderPath,
|
||||||
secretName: secretName ?? "*",
|
secretName,
|
||||||
secretTags: ["*"]
|
secretTags: ["*"]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user