diff --git a/assets/js/aws.permissions.cloud.js b/assets/js/aws.permissions.cloud.js index 997738e..5812fa5 100644 --- a/assets/js/aws.permissions.cloud.js +++ b/assets/js/aws.permissions.cloud.js @@ -278,7 +278,7 @@ function processCustomPolicy(iam_def, tags) { var foundmatch = false; var matchexpression = "^" + action.replace(/\*/g, ".*").replace(/\?/g, ".{1}") + "$"; Object.keys(allactions).forEach(potentialaction => { - var re = new RegExp(matchexpression.toLowerCase()); + var re = new RegExp(matchexpression.toLowerCase(), "i"); if (potentialaction.toLowerCase().match(re)) { foundmatch = true; @@ -344,7 +344,7 @@ function processCustomPolicy(iam_def, tags) { var matched = false; statement['NotAction'].forEach(action => { var matchexpression = "^" + action.replace(/\*/g, ".*").replace(/\?/g, ".{1}") + "$"; - var re = new RegExp(matchexpression.toLowerCase()); + var re = new RegExp(matchexpression.toLowerCase(), "i"); if (potentialaction.toLowerCase().match(re)) { matched = true; } @@ -1032,6 +1032,13 @@ async function processReferencePage() { processCustomPolicy(iam_def, tags); }, 800); }); + + $('#custompolicy-considerarn').change(function() { + clearTimeout(custom_policy_timer); + custom_policy_timer = setTimeout(function(){ + processCustomPolicy(iam_def, tags); + }, 800); + }); } // dashboard