Fixes an issue where the access type is not defaulted
This issue occurs where a service already existed prior to the introduction of the new access field for restrictions. This fix will default access to 'whitelist' where it did not exist before in cassandra. Change-Id: I972fc63db3ab290c5174b9969cfe993c12f5f48f
This commit is contained in:
parent
ccc58cfd78
commit
0cf1ac1cd9
@ -27,8 +27,6 @@ class Restriction(common.DictSerializableModel):
|
||||
"""Restriction."""
|
||||
|
||||
def __init__(self, name,
|
||||
# use r_type because type is
|
||||
# a python reserved word
|
||||
access='whitelist', rules=[]):
|
||||
self._name = name
|
||||
self._access = access
|
||||
|
@ -645,7 +645,7 @@ class ServicesController(base.ServicesController):
|
||||
|
||||
restrictions = [restriction.Restriction(
|
||||
r.get('name'),
|
||||
r.get('access'),
|
||||
r.get('access', 'whitelist'),
|
||||
[rule.Rule(r_rule.get('name'),
|
||||
referrer=r_rule.get('referrer'),
|
||||
client_ip=r_rule.get('client_ip'),
|
||||
|
Loading…
Reference in New Issue
Block a user