Change how we prevent edit/delete for demo users
to take new 'demo' user into account, but also more readable
This commit is contained in:
parent
82d5bcc0ed
commit
d5a9b5c471
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
User views
|
||||
"""
|
||||
|
@ -14,10 +14,10 @@ class UsersView(base.UsersView):
|
|||
"""
|
||||
|
||||
def editable_instance(self, user):
|
||||
return user.uuid != '28eeee92bcf411e6a7c23ca9f40bc550'
|
||||
return user.username not in ('chuck', 'demo')
|
||||
|
||||
def deletable_instance(self, user):
|
||||
return user.uuid != '28eeee92bcf411e6a7c23ca9f40bc550'
|
||||
return user.username not in ('chuck', 'demo')
|
||||
|
||||
|
||||
def includeme(config):
|
||||
|
|
Loading…
Reference in a new issue