view MoinMoin/_tests/common.py @ 3482:b0a794176dc4

sorted builtin default config, added more comments renamed cfg.trusted_auth_methods to cfg.auth_methods_trusted renamed cfg.disabled_userprefs to cfg.userprefs_disabled:
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Apr 2008 19:14:31 +0200
parents 0813af0f2425
children
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - MoinMoin.packages tests - common code

    @copyright: 2007 MoinMoin:KarolNowak
    @license: GNU GPL, see COPYING for details.
"""

def gain_superuser_rights(request):
    request.user.name = "SuperUserName"
    request.user.valid = 1
    request.user.may.name = request.user.name
    request.cfg.superuser.append(request.user.name)
    request.user.auth_method = request.cfg.auth_methods_trusted[0]