mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Enhance InfisicalSecretInput to use wildcard for environment and secret tags; update error message to reflect resource type. Improve tooltip in CreateSecretForm for secret references in both Overview and SecretDashboard pages.
This commit is contained in:
@@ -337,10 +337,10 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
permission,
|
||||
ProjectPermissionSecretActions.ReadValue,
|
||||
{
|
||||
environment: propEnvironment ?? "",
|
||||
environment: propEnvironment ?? "*",
|
||||
secretPath: propSecretPath ?? "/",
|
||||
secretName: segment,
|
||||
secretTags: []
|
||||
secretTags: ["*"]
|
||||
}
|
||||
);
|
||||
|
||||
@@ -395,14 +395,21 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
||||
{
|
||||
environment: environmentSlug,
|
||||
secretPath,
|
||||
secretName: secretName ?? "",
|
||||
secretTags: []
|
||||
secretName: secretName ?? "*",
|
||||
secretTags: ["*"]
|
||||
}
|
||||
);
|
||||
|
||||
let resourceName = "secret";
|
||||
if (segment === environmentSlug) {
|
||||
resourceName = "environment";
|
||||
} else if (segment !== secretName && folderPath.includes(segment)) {
|
||||
resourceName = "folder";
|
||||
}
|
||||
|
||||
if (!canReadSecretValue) {
|
||||
createNotification({
|
||||
text: "You do not have permission to access this secret",
|
||||
text: `You do not have permission to access this ${resourceName}`,
|
||||
type: "error"
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user