'Makes the current session owner of a record
@param table: the table or table name
@param record_id: the record ID'

def s3_make_session_owner(self, table, record_id):

    if hasattr(table, '_tablename'):
        tablename = original_tablename(table)
    else:
        tablename = table
    if (not self.user):
        session = current.session
        if ('owned_records' not in session):
            session.owned_records = {}
        records = session.owned_records.get(tablename, [])
        record_id = str(record_id)
        if (record_id not in records):
            records.append(record_id)
        session.owned_records[tablename] = records
