Welcome | Get started | Dive into Lino | Contribute | Reference
lino.modlib.users.utils¶
Utilities for managing the The current user type.
Functions
|
|
|
|
|
Used in doctests to set a default profile |
|
Run the given callable func with the given user type activated. |
Classes
|
A context manager which activates a current user type. |
- lino.modlib.users.utils.with_user_profile(profile, func, *args, **kwargs)¶
Run the given callable func with the given user type activated. Optional args and kwargs are forwarded to the callable, and the return value is returned.
This might get deprecated some day since we now have the
lino.modlib.users.UserType.context()
method
- lino.modlib.users.utils.set_user_profile(profile)¶
Used in doctests to set a default profile
- class lino.modlib.users.utils.UserTypeContext(user_type)¶
Bases:
object
A context manager which activates a current user type.