users in Lino Seggi

The lino_seggi.lib.users plugin extends lino.modlib.users.

This page contains code snippets (lines starting with >>>), which are being tested during our development workflow. The following snippet initializes the demo project used throughout this page.

>>> from lino.api import startup
>>> startup('lino_seggi.projects.seggi1.settings')
>>> from lino.api.doctest import *

Available user types

Lino Seggi knows the following user types:

>>> rt.show(rt.models.users.UserTypes)
======= =========== ===============
 value   name        text
------- ----------- ---------------
 000     anonymous   Anonymous
 100     user        User
 500     staff       Staff
 900     admin       Administrator
======= =========== ===============

A demo site has the following users:

>>> rt.show(rt.models.users.ListedUsers)
...
============================ ===================== ==========
 Username                     User type             Language
---------------------------- --------------------- ----------
 alfons.ausdemwald            100 (User)            en
 andreas.arens                100 (User)            en
 ...
 michael.mießen               100 (User)            en
 rando                        900 (Administrator)   et
 robin                        900 (Administrator)   en
 ulrike.charlier              100 (User)            en
============================ ===================== ==========

The site manager

Robin is a site manager, he has a complete menu.

>>> show_menu('robin')
...
- Seats : My Votes, My pending votes, Boards, Deprecated tenures, My deprecated tenures
- Office : Data problem messages assigned to me, My Comments, Recent comments
- Friends : My friends, Sent friend requests, Incoming friend requests
- Configure :
  - Site : Users, Groups, Site configuration, System tasks
  - Office : Comment Types
- Explorer :
  - Seats : Tenures, Votes
  - Site : Authorizations, User types, User roles, Data checkers, Data problem messages, Notification messages, Group memberships, All dashboard widgets, content types, Background procedures
  - Friends : Friend requests
  - Office : Comments, Reactions, Mentions
- Site : About, User sessions, Set my current group