def has_access(self, permission_name, view_name):
if current_user.is_authenticated:<EOL><INDENT>return self._has_view_access(g.user, permission_name, view_name)<EOL><DEDENT>elif current_user_jwt:<EOL><INDENT>return self._has_view_access(current_user_jwt, permission_name, view_name)<EOL><DEDENT>else:<EOL><INDENT>return self.is_item_public(permission_name, view_name)<EOL><DEDENT>
Check if current user or public has access to view or menu