add tests, example

This commit is contained in:
Stefano Brentegani
2014-07-28 06:47:19 +02:00
parent cba43db882
commit 97c317f83d
4 changed files with 104 additions and 13 deletions

View File

@ -42,6 +42,7 @@ from helpdesk.models import Ticket, Queue, FollowUp, TicketChange, PreSetReply,
from helpdesk import settings as helpdesk_settings
if helpdesk_settings.HELPDESK_CUSTOM_STAFF_FILTER_CALLBACK:
# apply a custom user validation condition
staff_member_required = user_passes_test(helpdesk_settings.HELPDESK_CUSTOM_STAFF_FILTER_CALLBACK)
elif helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE:
# treat 'normal' users like 'staff'