org.request

Module Contents

Classes

OrgRequest

Extends the default Morepath request with virtual host support and

class org.request.OrgRequest(*args, **kwargs)[source]

Bases: onegov.core.request.CoreRequest

Extends the default Morepath request with virtual host support and other useful methods.

Virtual hosting might be supported by Morepath directly in the future: https://github.com/morepath/morepath/issues/185

property current_username: str | None[source]
is_manager() bool[source]

Returns true if the current user is logged in, and has the role editor or admin.

is_manager_for_model(model: object) bool[source]
is_admin() bool[source]

Returns true if the current user is an admin.

is_editor() bool[source]

Returns true if the current user is an editor.

current_user() onegov.user.User | None[source]
first_admin_available() onegov.user.User | None[source]
auto_accept_user() onegov.user.User | None[source]
email_for_new_tickets() str | None[source]
active_mtan_session() bool[source]
mtan_accesses() onegov.org.models.TANAccessCollection[source]
mtan_access_limit_exceeded() bool[source]
auto_accept(ticket: onegov.ticket.Ticket) bool[source]