Skip to content

Commit

Permalink
feat: Changes according to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luhanamz committed Aug 31, 2021
1 parent 621ff6a commit e25aeff
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,16 @@ function validateExistCustomPolicies(customPolicies: CustomIAMPolicies) : Boolea
const validatePolicies = ajv.compile(CustomIAMPoliciesSchema);


if(!validatePolicies(customPolicies)) {
if (!validatePolicies(customPolicies)) {
return false;
}

if (customPolicies.policies.length === 1
&& customPolicies.policies[0].Action?.length === 0
&& customPolicies.policies[0].Resource?.length === 0) {
return false;
}

return true;
}

Expand Down

0 comments on commit e25aeff

Please sign in to comment.