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.
Private comments are seen only by their respective author.
Public comments are shown to other social workers. Comments are never shown to
the external supervisor.
A system administrator can see all comments (it makes no
sense to hide them because a system admin can easily create or use a user
account with the permissions they want).
>>> rt.login('').show(comments.RecentComments,**kwargs)...Traceback (most recent call last):...django.core.exceptions.PermissionDenied: Not permitted for anonymous
Summary:
>>> rows=[]>>> views=(comments.Comments,avanti.Clients)>>> headers=["User","type"]+[i.__name__foriinviews]>>> user_list=[users.User.get_anonymous_user()]+list(users.User.objects.all())>>> foruinuser_list:... cells=[str(u.username),u.user_type.name]... fordvinviews:... qs=dv.create_request(user=u).data_iterator... cells.append(str(qs.count()))... rows.append(cells)>>> print(rstgen.table(headers,rows))...=========== ============= ========== ========= User type Comments Clients----------- ------------- ---------- --------- anonymous anonymous 0 58 audrey auditor 0 58 martina coordinator 0 58 nathalie user 12 58 nelly user 12 58 sandra secretary 0 58 laura teacher 0 58 romain admin 108 58 rolf admin 108 58 robin admin 108 58=========== ============= ========== =========
comments(comments in Avanti)¶The
lino.modlib.commentsin Lino Avanti is configured and used to satisfy the application requirements.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.Overview¶
Comments in Lino Avanti are considered confidential data and can be seen only by users with appropriate permission.
See also User types in Lino Avanti.
Private comments are seen only by their respective author.
Public comments are shown to other social workers. Comments are never shown to the external supervisor.
A system administrator can see all comments (it makes no sense to hide them because a system admin can easily create or use a user account with the permissions they want).
Comments are private by default:
All partners are
Commentable, but in Lino Avanti: we use comments only onClient.Tests¶
The demo database contains 108 comments, and they are all private.
Robin can see them all.
Nathalie sees only her own comments:
Summary: