Modify the docstring of method 'check_is_admin'

Modify the docstring of 'check_is_admin', by default
the rule will check whether or not roles contains
'admin' role and is admin project.

Change-Id: I60903152dead93e1421a0a32cff7d5c7e3646579
This commit is contained in:
huangtianhua 2017-10-13 11:47:21 +08:00
parent a4f2dccf0e
commit 7b08cf9299
1 changed files with 4 additions and 1 deletions

View File

@ -82,7 +82,10 @@ class Enforcer(object):
return self._check(context, _action, _target, self.exc, action=action)
def check_is_admin(self, context):
"""Whether or not roles contains 'admin' role according to policy.json.
"""Whether or not is admin according to policy.json.
By default the rule will check whether or not roles contains
'admin' role and is admin project.
:param context: Heat request context
:returns: A non-False value if the user is admin according to policy