diff options
author | Doug Hellmann <doug@doughellmann.com> | 2017-10-09 09:31:08 -0400 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2017-10-09 09:31:08 -0400 |
commit | 8710f6338d0596ebc7c0d8a69675d9333631504b (patch) | |
tree | 04d3e0614f19d43fa7318bc1422e59ef79971f51 | |
parent | cb35d3480256daa49edc1e46da6db15bc73a314c (diff) | |
download | oslo-policy-8710f6338d0596ebc7c0d8a69675d9333631504b.tar.gz |
expand type documentation for Enforcer arguments
As part of bug #1720354 we discovered that arguments being passed to
the enforcer were not always dictionaries and did not always support
the full API needed. Expand the documentation to make the requirements
clearer.
Change-Id: I6c940d825cf72777e2a7946ab7489a1ed5359235
Closes-Bug: #1720354
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
-rw-r--r-- | oslo_policy/policy.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py index 1736e98..b26f6cd 100644 --- a/oslo_policy/policy.py +++ b/oslo_policy/policy.py @@ -706,8 +706,12 @@ class Enforcer(object): :param rule: The rule to evaluate. :type rule: string or :class:`BaseCheck` - :param dict target: As much information about the object being operated - on as possible. + :param dict target: As much information about the object being + operated on as possible. The target + argument should be a dict instance or an + instance of a class that fully supports + the Mapping abstract base class and deep + copying. :param dict creds: As much information about the user performing the action as possible. :param do_raise: Whether to raise an exception or not if check |