92 |
92 |
93 Params: |
93 Params: |
94 params: a dict with params for this View |
94 params: a dict with params for this View |
95 """ |
95 """ |
96 |
96 |
97 new_params = {} |
|
98 new_params['logic'] = notification_logic.logic |
|
99 |
|
100 new_params['name'] = "Notification" |
|
101 new_params['name_short'] = "Notification" |
|
102 new_params['name_plural'] = "Notifications" |
|
103 new_params['url_name'] = "notification" |
|
104 new_params['module_name'] = "notification" |
|
105 |
|
106 new_params['create_form'] = CreateForm |
|
107 |
|
108 rights = {} |
97 rights = {} |
109 rights['unspecified'] = [access.deny] |
98 rights['unspecified'] = [access.deny] |
110 rights['edit'] = [access.deny] |
99 rights['edit'] = [access.deny] |
111 rights['show'] = [access.checkIsMyNotification] |
100 rights['show'] = [access.checkIsMyNotification] |
112 rights['delete'] = [access.checkIsDeveloper] |
101 rights['delete'] = [access.checkIsDeveloper] |
113 rights['list'] = [access.checkIsUser] |
102 rights['list'] = [access.checkIsUser] |
114 # create is developer only for the time being to test functionality |
103 # create is developer only for the time being to test functionality |
115 rights['create'] = [access.checkIsDeveloper] |
104 rights['create'] = [access.checkIsDeveloper] |
116 |
105 |
|
106 new_params = {} |
|
107 new_params['logic'] = notification_logic.logic |
117 new_params['rights'] = rights |
108 new_params['rights'] = rights |
|
109 |
|
110 new_params['name'] = "Notification" |
|
111 new_params['name_short'] = "Notification" |
|
112 new_params['name_plural'] = "Notifications" |
|
113 new_params['url_name'] = "notification" |
|
114 new_params['module_name'] = "notification" |
|
115 |
|
116 new_params['create_form'] = CreateForm |
118 |
117 |
119 params = dicts.merge(params, new_params) |
118 params = dicts.merge(params, new_params) |
120 |
119 |
121 super(View, self).__init__(params=params) |
120 super(View, self).__init__(params=params) |
122 |
121 |