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:
Lance Edgar 2017-08-13 23:47:17 -05:00
parent 82d5bcc0ed
commit d5a9b5c471

View file

@ -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):