# HG changeset patch # User Sverre Rabbelier # Date 1229173725 0 # Node ID 78fc6080ea138646b78eae678522290ac114582a # Parent 0a8e602283118be8cce66d523bca801bf667aa94 Remove custom override of django_patterns_defaults Instead restrict access to the edit method, also, there is no need to set the default access to allow. Patch by: Sverre Rabbelier diff -r 0a8e60228311 -r 78fc6080ea13 app/soc/views/models/notification.py --- a/app/soc/views/models/notification.py Sat Dec 13 13:08:23 2008 +0000 +++ b/app/soc/views/models/notification.py Sat Dec 13 13:08:45 2008 +0000 @@ -105,23 +105,9 @@ new_params['create_form'] = CreateForm - # define the django url patterns - new_params['django_patterns_defaults'] = [ - (r'^%(url_name)s/(?Pshow)/%(key_fields)s$', - 'soc.views.models.%(module_name)s.public', 'Show %(name_short)s'), - (r'^%(url_name)s/(?Pcreate)$', - 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'), - (r'^%(url_name)s/(?Pcreate)/%(scope)s$', - 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'), - (r'^%(url_name)s/(?Pdelete)/%(key_fields)s$', - 'soc.views.models.%(module_name)s.delete', 'Delete %(name_short)s'), - (r'^%(url_name)s/(?Plist)$', - 'soc.views.models.%(module_name)s.list', 'List %(name_plural)s'), - ] - rights = {} rights['unspecified'] = [access.deny] - rights['any_access'] = [access.allow] + rights['edit'] = [access.deny] rights['show'] = [access.checkIsMyNotification] rights['delete'] = [access.checkIsDeveloper] rights['list'] = [access.checkIsUser]