def get_table_list(self, cursor):
        # TABLES: http://msdn2.microsoft.com/en-us/library/ms186224.aspx
        if cursor.db.limit_table_list:
            cursor.execute("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = 'dbo'")
        else:
            cursor.execute("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'")
        return [row[0] for row in cursor.fetchall()]

        # Or pyodbc specific:
        #return [row[2] for row in cursor.tables(tableType='TABLE')]
Validates if permissions are set correctly.
dataset/ETHPy150Open lionheart/django-pyodbc/django_pyodbc/introspection.py/DatabaseIntrospection.get_table_list--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/core/doctype/doctype/doctype.py/validate_permissions_for_doctype