Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

# Copyright 2015-2016 Luc Saffre 

# License: BSD (see file COPYING for details) 

"""User roles for `lino.modlib.office`. 

 

""" 

 

from lino.core.roles import UserRole, SiteUser, SiteAdmin 

 

from lino.modlib.contacts.roles import ContactsUser, ContactsStaff 

 

 

class OfficeUser(ContactsUser): 

    """A user who has access to office functionality like calendar, notes 

    and uploads. 

 

    """ 

 

 

class OfficeOperator(SiteUser): 

    """A user who manages office functionality for other users (but not 

    for himself). 

 

    Currently an office operator can create their own notes and 

    uploads but no calendar entries. 

 

    """ 

 

 

class OfficeStaff(OfficeUser, OfficeOperator,ContactsStaff): 

    """A user who manages configuration of office functionality. 

 

    """ 

 

 

class SiteAdmin(SiteAdmin, OfficeStaff): 

    """A user with all permissions.""" 

    pass 

 

from django.utils.translation import ugettext_lazy as _ 

from lino.modlib.users.choicelists import UserProfiles 

 

UserProfiles.clear() 

add = UserProfiles.add_item 

add('000', _("Anonymous"), UserRole, name='anonymous', readonly=True) 

add('100', _("User"), OfficeUser, name='user') 

add('900', _("Administrator"), SiteAdmin, name='admin')