Skip to content
Permalink
Browse files

have users be SiteStaff only

  • Loading branch information
CylonOven committed Nov 15, 2019
1 parent 43799e4 commit 27c3c404357df61abfc398ad77d5868a9950a3c5
Showing with 4 additions and 1 deletion.
  1. +1 −1 lino/modlib/users/desktop.py
  2. +3 −0 lino/modlib/users/models.py
@@ -72,6 +72,7 @@ class Users(dd.Table):
#~ order_by = "last_name first_name".split()
order_by = ["username"]
active_fields = 'partner'
required_roles = dd.login_required(SiteAdmin)

parameters = dict(
user_type=UserTypes.field(blank=True))
@@ -104,7 +105,6 @@ def render_list_item(cls, obj, ar):


class AllUsers(Users):
required_roles = dd.login_required(SiteAdmin)
send_welcome_email = SendWelcomeMail()

class UsersOverview(Users):
@@ -159,6 +159,9 @@ def disabled_fields(self, ar):
rv = super(User, self).disabled_fields(ar)
user = ar.get_user()
if not user.user_type.has_required_roles([SiteAdmin]):
if not dd.is_installed("online"):
rv.add("submit_insert")
rv.add("insert")
rv.add('send_email')
rv.add('user_type')
if user != self:

0 comments on commit 27c3c40

Please sign in to comment.
You can’t perform that action at this time.