mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 02:41:26 +01:00
Do not use the builtin staff_member_required decorator.
Before 1.7, this decorator always redirects to the admin login page so the LOGIN_URL setting is useless.
This commit is contained in:
parent
5e30c86561
commit
91628ab788
@ -45,10 +45,7 @@ if helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE:
|
||||
# treat 'normal' users like 'staff'
|
||||
staff_member_required = user_passes_test(lambda u: u.is_authenticated() and u.is_active)
|
||||
else:
|
||||
try:
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
except:
|
||||
staff_member_required = user_passes_test(lambda u: u.is_authenticated() and u.is_active and u.is_staff)
|
||||
staff_member_required = user_passes_test(lambda u: u.is_authenticated() and u.is_active and u.is_staff)
|
||||
|
||||
|
||||
superuser_required = user_passes_test(lambda u: u.is_authenticated() and u.is_active and u.is_superuser)
|
||||
|
Loading…
Reference in New Issue
Block a user