def _parse_permission(self, obj):
if isinstance(obj, str):<EOL><INDENT>if obj == '<STR_LIT:*>':<EOL><INDENT>return A.ALL<EOL><DEDENT>elif obj in A.ALL:<EOL><INDENT>return obj,<EOL><DEDENT>else:<EOL><INDENT>logger.warning('<STR_LIT>', obj)<EOL><DEDENT><DEDENT>elif isinstance(obj, (list, tuple)):<EOL><INDENT>for i in obj:<EOL><INDENT>if i not in A.ALL:<EOL><INDENT>logger.warning('<STR_LIT>', i)<EOL><DEDENT><DEDENT>return obj<EOL><DEDENT>elif isinstance(obj, dict):<EOL><INDENT>return self._parse_permission(obj.get('<STR_LIT:*>'))<EOL><DEDENT>
从 obj 中取出权限
:param obj:
:return: [A.QUERY, A.WRITE, ...]