diff options
author | Zuul <zuul@review.opendev.org> | 2021-10-25 13:50:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2021-10-25 13:50:40 +0000 |
commit | 4757688ecf5585f5e87795a3efe3c8ea48df0c7b (patch) | |
tree | 61c2189c452af6c2f6bbff26f9bdee390533abc5 /oslo_policy | |
parent | 8a3998af18e1e86dc98005947c06eff593ae2229 (diff) | |
parent | 302643b027a3f3d894c32054cee2220e02a20a8a (diff) | |
download | oslo-policy-4757688ecf5585f5e87795a3efe3c8ea48df0c7b.tar.gz |
Merge "Don't reset rules without overwriting"
Diffstat (limited to 'oslo_policy')
-rw-r--r-- | oslo_policy/policy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py index bbeeacd..49008e8 100644 --- a/oslo_policy/policy.py +++ b/oslo_policy/policy.py @@ -657,12 +657,12 @@ class Enforcer(object): # rules in main policy file. And after that we apply rules # from every policy directory. if self.policy_path: - if not policy_file_rules_changed: + if not policy_file_rules_changed and self.overwrite: self._load_policy_file(path=self.policy_path, force_reload=True, overwrite=self.overwrite ) - else: + elif self.overwrite: self.rules = Rules(default_rule=self.default_rule) for path in existing_policy_dirs: self._walk_through_policy_directory( |