'Check whether record approval is required for a table
@param table: the table (or tablename)'

@classmethod
def requires_approval(cls, table):

    settings = current.deployment_settings
    if settings.get_auth_record_approval():
        if (type(table) is Table):
            tablename = original_tablename(table)
        else:
            tablename = table
        tables = settings.get_auth_record_approval_required_for()
        if (tables is not None):
            return (tablename in tables)
        elif current.s3db.get_config(tablename, 'requires_approval'):
            return True
        else:
            return False
    else:
        return False
