mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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
|
||||
if (segment === secretName) {
|
||||
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
|
||||
@@ -396,8 +394,8 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
ProjectPermissionSecretActions.ReadValue,
|
||||
{
|
||||
environment: environmentSlug,
|
||||
secretPath,
|
||||
secretName: secretName ?? "*",
|
||||
secretPath: folderPath,
|
||||
secretName,
|
||||
secretTags: ["*"]
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user