Remove custom logic for User views
this was to protect the 'chuck' user but we now have better (upstream) ways
This commit is contained in:
parent
69316183f7
commit
f1a01af3c9
|
@ -30,7 +30,7 @@ def includeme(config):
|
|||
config.include('tailbone.views.subdepartments')
|
||||
config.include('rattail_demo.web.views.tempmon')
|
||||
config.include('rattail_demo.web.views.upgrades')
|
||||
config.include('rattail_demo.web.views.users')
|
||||
config.include('tailbone.views.users')
|
||||
config.include('rattail_demo.web.views.vendors')
|
||||
|
||||
# core-pos views
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
User views
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from tailbone.views import users as base
|
||||
|
||||
|
||||
class UsersView(base.UsersView):
|
||||
"""
|
||||
Prevent edit/delete for 'chuck'
|
||||
"""
|
||||
|
||||
def editable_instance(self, user):
|
||||
return user.username not in ('chuck', 'demo')
|
||||
|
||||
def deletable_instance(self, user):
|
||||
return user.username not in ('chuck', 'demo')
|
||||
|
||||
|
||||
def includeme(config):
|
||||
UsersView.defaults(config)
|
||||
base.UserEventsView.defaults(config)
|
Loading…
Reference in a new issue