Skip to content

Commit

Permalink
Add binding for checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
iann0036 committed Sep 22, 2023
1 parent 9b6efc8 commit 468f74d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions assets/js/aws.permissions.cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 468f74d

Please sign in to comment.