示例#1
0
def admin():
    """Super-admin page; allows roles to be changed. Don't advertise.
    Misuse will totally break everything."""
    aaa.require(role='admin', fail_redirect='/sorry_page')
    return dict(current_user=aaa.current_user,
                users=aaa.list_users(),
                roles=aaa.list_roles())
示例#2
0
def admin():
    """Regular, more user-friendly admin."""
    aaa.require(role='admin', fail_redirect='/sorry_page')
    return dict(
        current_user=aaa.current_user,
        users=aaa.list_users(),
        roles=aaa.list_roles()
    )
示例#3
0
def admin():
    """Super-admin page; allows roles to be changed. Don't advertise.
    Misuse will totally break everything."""
    aaa.require(role='admin', fail_redirect='/sorry_page')
    return dict(
        current_user=aaa.current_user,
        users=aaa.list_users(),
        roles=aaa.list_roles()
    )
示例#4
0
def admin():
    """Regular, more user-friendly admin."""
    aaa.require(role='admin', fail_redirect='/sorry_page')
    return dict(current_user=aaa.current_user,
                users=aaa.list_users(),
                roles=aaa.list_roles())