summaryrefslogtreecommitdiff
path: root/designate/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'designate/context.py')
-rw-r--r--designate/context.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/designate/context.py b/designate/context.py
index 13ccda13..b5c2c1e8 100644
--- a/designate/context.py
+++ b/designate/context.py
@@ -107,6 +107,8 @@ class DesignateContext(context.RequestContext):
# NOTE(kiall): Ugly - required to match http://tinyurl.com/o3y8qmw
context.roles.append('admin')
+ if policy.enforce_new_defaults():
+ context.system_scope = 'all'
if show_deleted is not None:
context.show_deleted = show_deleted
@@ -132,7 +134,8 @@ class DesignateContext(context.RequestContext):
def get_admin_context(cls, **kwargs):
# TODO(kiall): Remove Me
kwargs['is_admin'] = True
- kwargs['roles'] = ['admin']
+ kwargs['roles'] = ['admin', 'reader']
+ kwargs['system_scope'] = 'all'
return cls(None, **kwargs)