wuttaweb.views.auth

Auth Views

class wuttaweb.views.auth.AuthView(request, context=None)[source]

Auth views shared by all apps.

become_root()[source]

Elevate the current request to ‘root’ for full system access.

This is only allowed if current (authenticated) user is a member of the Administrator role. Also note that GET is not allowed for this view, only POST.

See also stop_root().

change_password()[source]

View allowing a user to change their own password.

This view shows a change-password form, and handles its submission. If successful, user is redirected to home page.

If current user is not authenticated, no form is shown and user is redirected to home page.

  • route: change_password

  • template: /auth/change_password.mako

login(session=None)[source]

View for user login.

This view shows the login form, and handles its submission. Upon successful login, user is redirected to home page.

  • route: login

  • template: /auth/login.mako

logout()[source]

View for user logout.

This deletes/invalidates the current user session and then redirects to the login page.

Note that a simple GET is sufficient; POST is not required.

  • route: logout

  • template: n/a

stop_root()[source]

Lower the current request from ‘root’ back to normal access.

Also note that GET is not allowed for this view, only POST.

See also become_root().