assembl.auth.upgradable_session module

class assembl.auth.upgradable_session.AppUpgradableSession(request, elevated=False, cookie_expires=True, elevated_expires=False, **kwargs)[source]

Bases: assembl.auth.upgradable_session.UpgradableSession

get_is_elevated()[source]

Returns whether the session is considered elevated.

Define in subclass so initial value is set properly.

class assembl.auth.upgradable_session.UpgradableSession(request, elevated=False, cookie_expires=True, elevated_expires=False, **kwargs)[source]

Bases: beaker.session.Session

A Session with different expiry parameters for elevated privileges

elevate_privilege(elevated=True)[source]

Set whether a session has elevated privileges.

Maybe this should be added to Session protocol?

abstract get_is_elevated()[source]

Returns whether the session is considered elevated.

Define in subclass so initial value is set properly.