Make the place of the rights declaration consistent
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 13 Dec 2008 13:09:06 +0000
changeset 734 1ebd40380aa5
parent 733 78fc6080ea13
child 735 28225172af06
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
app/soc/views/models/notification.py
--- 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)