diff options
Diffstat (limited to 'glance/api/policy.py')
-rw-r--r-- | glance/api/policy.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/glance/api/policy.py b/glance/api/policy.py index 605b8118c..d92d4df6d 100644 --- a/glance/api/policy.py +++ b/glance/api/policy.py @@ -34,11 +34,15 @@ CONF = cfg.CONF _ENFORCER = None -# TODO(gmann): Remove setting the default value of config policy_file -# once oslo_policy change the default value to 'policy.yaml'. -# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49 +# TODO(gmann): Remove overriding the default value of config options +# 'policy_file', 'enforce_scope', and 'enforce_new_defaults' once +# oslo_policy change their default value to what is overridden here. DEFAULT_POLICY_FILE = 'policy.yaml' -opts.set_defaults(cfg.CONF, DEFAULT_POLICY_FILE) +opts.set_defaults( + cfg.CONF, + DEFAULT_POLICY_FILE, + enforce_scope=True, + enforce_new_defaults=True) class Enforcer(policy.Enforcer): |