Fix docstring for policy.enforce method
This patch corrects the name of the 'target' parameter and adds the 'do_raise' parameter in the doc string for the policy.enforce method. TrivialFix Change-Id: Ib6000ae868bc91a1aa8504b377408a829f1c9951
This commit is contained in:
parent
e0bd245203
commit
aac93592a9
@ -51,12 +51,17 @@ def enforce(context, action, target, do_raise=True):
|
|||||||
i.e. ``compute:create_instance``,
|
i.e. ``compute:create_instance``,
|
||||||
``compute:attach_volume``,
|
``compute:attach_volume``,
|
||||||
``volume:attach_volume``
|
``volume:attach_volume``
|
||||||
|
:param target: dictionary representing the object of the action
|
||||||
:param object: dictionary representing the object of the action
|
|
||||||
for object creation this should be a dictionary representing the
|
for object creation this should be a dictionary representing the
|
||||||
location of the object e.g. ``{'project_id': context.project_id}``
|
location of the object e.g. ``{'project_id': context.project_id}``
|
||||||
|
:param do_raise: Whether to raise an exception if check fils.
|
||||||
|
|
||||||
:raises manila.exception.PolicyNotAuthorized: if verification fails.
|
:returns: When ``do_raise`` is ``False``, returns a value that
|
||||||
|
evaluates as ``True`` or ``False`` depending on whether
|
||||||
|
the policy allows action on the target.
|
||||||
|
|
||||||
|
:raises: manila.exception.PolicyNotAuthorized if verification fails
|
||||||
|
and ``do_raise`` is ``True``.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
init()
|
init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user