diff options
author | Ghanshyam Mann <gmann@ghanshyammann.com> | 2020-04-09 10:18:00 -0500 |
---|---|---|
committer | Ghanshyam Mann <gmann@ghanshyammann.com> | 2020-04-09 10:31:09 -0500 |
commit | e2ad8f6ce87e72cd6187ff0039aa7a3d06b8ce32 (patch) | |
tree | 569518b0f99aacdaeba5f1136f03492913f9c564 /oslo_policy | |
parent | 99012db14bd0e6f87aa2b79c272c7f5951972d41 (diff) | |
download | oslo-policy-e2ad8f6ce87e72cd6187ff0039aa7a3d06b8ce32.tar.gz |
Fix doc comments for new enforce default flag
This commit fixes the review comments from
patch - https://review.opendev.org/#/c/717943/
Change-Id: I00edbea503aefbce31cbb43a74929db752235bf0
Diffstat (limited to 'oslo_policy')
-rw-r--r-- | oslo_policy/opts.py | 12 | ||||
-rw-r--r-- | oslo_policy/policy.py | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/oslo_policy/opts.py b/oslo_policy/opts.py index 16e3696..5eb93d7 100644 --- a/oslo_policy/opts.py +++ b/oslo_policy/opts.py @@ -39,12 +39,12 @@ _options = [ help=_('This option controls whether or not to use old ' 'deprecated defaults when evaluating policies. If ' '``True``, the old deprecated defaults are not going ' - 'to be evaluated which mean if any existing token ' - 'allowed for old defaults but disallowed for new ' - 'defaults will be disallowed. It is encouraged to ' - 'enable this flag along with ``enforce_scope`` flag ' - 'so that you can get benefits of new defaults and ' - '``scope_type`` together')), + 'to be evaluated. This means if any existing token is ' + 'allowed for old defaults but is disallowed for new ' + 'defaults, it will be disallowed. It is encouraged to ' + 'enable this flag along with the ``enforce_scope`` ' + 'flag so that you can get the benefits of new defaults ' + 'and ``scope_type`` together')), cfg.StrOpt('policy_file', default='policy.json', help=_('The relative or absolute path of a file that maps ' diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py index b019315..2bcd353 100644 --- a/oslo_policy/policy.py +++ b/oslo_policy/policy.py @@ -696,8 +696,8 @@ class Enforcer(object): # messages telling them stuff is going to change if they don't maintain # the policy manually or add infrastructure to their deployment to # support the new policy. - # If flag enforce_new_defaults is true then do not add OrCheck - # the old check_str and enforce only new defaults. + # If the enforce_new_defaults flag is True, do not add OrCheck to the + # old check_str and enforce only the new defaults. if (not self.conf.oslo_policy.enforce_new_defaults and deprecated_rule.check_str != default.check_str and default.name not in self.file_rules): |