Skip to content

Commit

Permalink
Object name dynamic policies
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanBoronat committed Nov 15, 2017
1 parent 077738d commit 5a984d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/policies/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,10 @@ def deploy_dynamic_policy(r, rule_string, parsed_rule, http_host):
object_type = ""
object_size = ""
object_tag = ""
object_name = ""
if parsed_rule.object_list:
if parsed_rule.object_list.object_name:
object_name = parsed_rule.object_list.object_name.object_value
if parsed_rule.object_list.object_type:
object_type = parsed_rule.object_list.object_type.object_value
if parsed_rule.object_list.object_tag:
Expand All @@ -451,6 +454,7 @@ def deploy_dynamic_policy(r, rule_string, parsed_rule, http_host):
"parameters": action_info.params,
"action": action_info.action,
"condition": condition_str.replace('WHEN ', ''),
"object_name": object_name,
"object_type": object_type,
"object_size": object_size,
"object_tag": object_tag,
Expand Down

0 comments on commit 5a984d4

Please sign in to comment.