Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default.

This commit is contained in:
David Baker 2015-03-10 17:26:25 +00:00
parent 8916acbc13
commit 04f8478aaa
4 changed files with 63 additions and 33 deletions

View file

@ -156,9 +156,12 @@ class PushRuleRestServlet(ClientV1RestServlet):
template_rule = _rule_to_template(r)
if template_rule:
template_rule['enabled'] = True
if r['rule_id'] in enabled_map:
template_rule['enabled'] = enabled_map[r['rule_id']]
elif 'enabled' in r:
template_rule['enabled'] = r['enabled']
else:
template_rule['enabled'] = True
rulearray.append(template_rule)
path = request.postpath[1:]