Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More
groups
: user groups¶
We assume that you have read the end-user documentation page in groups : User groups.
This page is a tested document and the following instructions are used for initialization:
>>> import lino
>>> lino.startup('lino_book.projects.noi1e.settings.demo')
>>> from lino.api.doctest import *
>>> from django.db.models import Q
Usage¶
When you install this plugin, you will probably add a panel "Memberships"
(MembershipsByUser
) to the detail layout of your
lino.modlib.users.UserDetail
.
This plugin doesn't create its own top-level menu but adds its menu commands to
the same menu as lino.modlib.system
.
>>> dd.plugins.groups.menu_group
'system'
In Lino Noi the verbose name of "Group" is changed to "Team".
>>> print(dd.plugins.groups.verbose_name)
Teams
>>> show_menu_path(groups.Groups)
Configure --> System --> Teams
Groups¶
>>> rt.login("robin").show(groups.Groups)
=========== ============= ================== ================== ========= ========================================================================
Reference Designation Designation (de) Designation (fr) Private Memberships
----------- ------------- ------------------ ------------------ --------- ------------------------------------------------------------------------
Developers Developers Developers No <div>**Jean**, **Mathieu**, **Robin Rood**, <b>New</b> <b>?</b> </div>
Managers Managers Managers Yes <div>**Luc**, **Romain Raffault**, <b>New</b> <b>?</b> </div>
Sales team Sales team Sales team No <div>**Marc**, **Rolf Rompen**, <b>New</b> <b>?</b> </div>
=========== ============= ================== ================== ========= ========================================================================
Jean does not see the private group
>>> rt.login("jean").show(groups.Groups)
=========== ============= ================== ================== ========= ==================================================
Reference Designation Designation (de) Designation (fr) Private Memberships
----------- ------------- ------------------ ------------------ --------- --------------------------------------------------
Developers Developers Developers No <div>**Jean**, **Mathieu**, **Robin Rood**</div>
Sales team Sales team Sales team No <div>**Marc**, **Rolf Rompen**</div>
=========== ============= ================== ================== ========= ==================================================
Anonymous doesn't see any groups:
>>> rt.show(groups.Groups)
No data to display
- class lino_xl.lib.groups.Group¶
Django model representing a user group.
- ref¶
The reference. An optional alphanumeric identifier that, unlike the primary key, is editable.
See
lino.mixins.ref.StructuredReferrable.ref
- name¶
The designation in different languages.
- user¶
The owner of the group
- private¶
Whether this group is considered private. See Visibility of comments.
- class lino_xl.lib.groups.Groups¶
Shows all groups.
- class lino_xl.lib.groups.Membership¶
Django model representing a user membership.
- user¶
- group¶
- remark¶