Clarify type for permission parameter

This commit is contained in:
Andrew Svetlov 2015-11-11 01:30:41 +02:00
parent 71880dfc72
commit ab81d73c34
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ def authorized_userid(request):
@asyncio.coroutine @asyncio.coroutine
def permits(request, permission, context=None): def permits(request, permission, context=None):
assert isinstance(permission, str), permission
identity_policy = request.app.get(IDENTITY_KEY) identity_policy = request.app.get(IDENTITY_KEY)
autz_policy = request.app.get(AUTZ_KEY) autz_policy = request.app.get(AUTZ_KEY)
if identity_policy is None or autz_policy is None: if identity_policy is None or autz_policy is None: