'Set the default approver for new records in table
@param table: the table
@param force: whether to force approval for tables which
require manual approval'

@classmethod
def set_default_approver(cls, table, force=False):

    APPROVER = 'approved_by'
    if (APPROVER in table):
        approver = table[APPROVER]
    else:
        return
    settings = current.deployment_settings
    auth = current.auth
    tablename = original_tablename(table)
    if (not settings.get_auth_record_approval()):
        if (auth.s3_logged_in() and auth.user):
            approver.default = auth.user.id
        else:
            approver.default = 0
    elif (force or (tablename not in settings.get_auth_record_approval_manual())):
        if auth.override:
            approver.default = 0
        elif (auth.s3_logged_in() and auth.s3_has_permission('approve', table)):
            approver.default = auth.user.id
        else:
            approver.default = None
