human
Complete this python program:
def facebook_channel():
assistant
#Here is the Python program you requested.

    """RESTful CRUD controller for Facebook channels
    - appears in the administration menu
    """
    if (not auth.s3_has_role(ADMIN)):
        auth.permission.fail()
    tablename = 'msg_facebook_channel'
    table = s3db[tablename]
    s3.crud_strings[tablename] = Storage(title_display=T('Facebook    Settings'), title_list=T('Facebook    Accounts'), label_create=T('Add    Facebook    Account'), title_update=T('Edit    Facebook    Settings'), label_list_button=T('View    Facebook    Accounts'), msg_record_created=T('Account    added'), msg_record_deleted=T('Facebook    Account    deleted'), msg_list_empty=T('No    Accounts    currently    defined'), msg_record_modified=T('Facebook    Settings    updated'))
    def postp(r, output):
        if r.interactive:
            s3_action_buttons(r)
            table = r.table
            query = (table.deleted == False)
            rows = db(query).select(table.id, table.enabled)
            restrict_e = [str(row.id) for row in rows if (not row.enabled)]
            restrict_d = [str(row.id) for row in rows if row.enabled]
            from s3 import s3_str
            s3.actions += [dict(label=s3_str(T('Enable')), _class='action-btn', url=URL(args=['[id]', 'enable']), restrict=restrict_e), dict(label=s3_str(T('Disable')), _class='action-btn', url=URL(args=['[id]', 'disable']), restrict=restrict_d)]
        return output
    s3.postp = postp
    return s3_rest_controller()