mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 09:30:09 +00:00
Fix root folder issue with folder policies check and multi env error message improvement
This commit is contained in:
+15
-2
@@ -166,23 +166,36 @@ export const SelectionPanel = ({
|
||||
secrets: secretsToDelete
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
environment: env.slug
|
||||
};
|
||||
});
|
||||
|
||||
const results = await Promise.allSettled(promises);
|
||||
const areEntriesDeleted = results.some((result) => result.status === "fulfilled");
|
||||
const areAllEntriesDeleted = results.every((result) => result.status === "fulfilled");
|
||||
const areSomeEntriesDeleted = results.some((result) => result.status === "fulfilled");
|
||||
if (processedEntries === 0) {
|
||||
handlePopUpClose("bulkDeleteEntries");
|
||||
createNotification({
|
||||
type: "info",
|
||||
text: "You don't have access to delete selected items"
|
||||
});
|
||||
} else if (areEntriesDeleted) {
|
||||
} else if (areAllEntriesDeleted) {
|
||||
handlePopUpClose("bulkDeleteEntries");
|
||||
resetSelectedEntries();
|
||||
createNotification({
|
||||
type: "success",
|
||||
text: "Successfully deleted selected secrets and folders"
|
||||
});
|
||||
} else if (areSomeEntriesDeleted) {
|
||||
createNotification({
|
||||
type: "warning",
|
||||
text: `Successfully deleted selected secrets and folders on environments: ${results
|
||||
.filter((result) => result.status === "fulfilled")
|
||||
.map((result) => result.value.environment)
|
||||
.join(", ")} but failed on the other environments`
|
||||
});
|
||||
} else {
|
||||
createNotification({
|
||||
type: "error",
|
||||
|
||||
Reference in New Issue
Block a user