Korektury: fix: dovol přístup orgům
This commit is contained in:
parent
86f909d53d
commit
b2c3f96f8d
1 changed files with 6 additions and 4 deletions
|
@ -1,10 +1,12 @@
|
|||
from django.conf.urls import * # NOQA
|
||||
from django.conf.urls import patterns, url
|
||||
from django.contrib.auth.decorators import permission_required
|
||||
from django.contrib.auth.decorators import user_passes_test
|
||||
from . import views
|
||||
|
||||
staff_member_required = user_passes_test(lambda u: u.is_staff)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^korektury/$',permission_required('is_staff')(views.KorekturyListView.as_view()),name='korektury-list'),
|
||||
url(r'^korektury/(?P<pdf>\d+)/$', permission_required('is_staff')(views.KorekturyView.as_view()), name='korektury'),
|
||||
url(r'^korektury/help/', permission_required('is_staff')(views.KorekturyHelpView.as_view()), name='korektury-help'),
|
||||
url(r'^korektury/$', staff_member_required(views.KorekturyListView.as_view()), name='korektury-list'),
|
||||
url(r'^korektury/(?P<pdf>\d+)/$', staff_member_required(views.KorekturyView.as_view()), name='korektury'),
|
||||
url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue