Make the place of the rights declaration consistent
Other code places it at the top, so we should do that in notification
as well.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/notification.py Sat Dec 13 13:08:45 2008 +0000
+++ b/app/soc/views/models/notification.py Sat Dec 13 13:09:06 2008 +0000
@@ -94,17 +94,6 @@
params: a dict with params for this View
"""
- new_params = {}
- new_params['logic'] = notification_logic.logic
-
- new_params['name'] = "Notification"
- new_params['name_short'] = "Notification"
- new_params['name_plural'] = "Notifications"
- new_params['url_name'] = "notification"
- new_params['module_name'] = "notification"
-
- new_params['create_form'] = CreateForm
-
rights = {}
rights['unspecified'] = [access.deny]
rights['edit'] = [access.deny]
@@ -114,8 +103,18 @@
# create is developer only for the time being to test functionality
rights['create'] = [access.checkIsDeveloper]
+ new_params = {}
+ new_params['logic'] = notification_logic.logic
new_params['rights'] = rights
+ new_params['name'] = "Notification"
+ new_params['name_short'] = "Notification"
+ new_params['name_plural'] = "Notifications"
+ new_params['url_name'] = "notification"
+ new_params['module_name'] = "notification"
+
+ new_params['create_form'] = CreateForm
+
params = dicts.merge(params, new_params)
super(View, self).__init__(params=params)