forked from TrueCloudLab/s3-tests
test_s3: modify make_json_policy to support conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
This commit is contained in:
parent
eee2d9a82c
commit
fe35325ab8
1 changed files with 5 additions and 2 deletions
|
@ -8754,8 +8754,11 @@ def make_json_policy(action, resource, principal={"AWS": "*"}, conditions=None):
|
|||
}]
|
||||
}
|
||||
|
||||
# Currently lets only support adding a common conditional to every
|
||||
# statement in this function
|
||||
for statement in policy["Statement"]:
|
||||
if conditions is not None:
|
||||
policy["Statement"]["Condition"] = conditions
|
||||
statement["Condition"] = conditions
|
||||
|
||||
return json.dumps(policy)
|
||||
|
||||
|
|
Loading…
Reference in a new issue