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
--- 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/(?P<access_type>show)/%(key_fields)s$',
- 'soc.views.models.%(module_name)s.public', 'Show %(name_short)s'),
- (r'^%(url_name)s/(?P<access_type>create)$',
- 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
- (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$',
- 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s'),
- (r'^%(url_name)s/(?P<access_type>delete)/%(key_fields)s$',
- 'soc.views.models.%(module_name)s.delete', 'Delete %(name_short)s'),
- (r'^%(url_name)s/(?P<access_type>list)$',
- '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]