Added rights to soc/views/models/timeline.py.
Only a developer or a host for the program this timeline is for can edit it now.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/timeline.py Sat Jan 31 13:48:48 2009 +0000
+++ b/app/soc/views/models/timeline.py Sat Jan 31 13:49:50 2009 +0000
@@ -29,6 +29,7 @@
from soc.logic import dicts
from soc.logic.models import program as program_logic
+from soc.views.helper import access
from soc.views.helper import dynaform
from soc.views.helper import params as params_helper
from soc.views.models import base
@@ -48,7 +49,11 @@
params: a dict with params for this View
"""
+ rights = access.Checker(params)
+ rights['edit'] = ['checkCanEditTimeline']
+
new_params = {}
+ new_params['rights'] = rights
new_params['logic'] = soc.logic.models.timeline.logic
new_params['edit_template'] = 'soc/timeline/edit.html'
new_params['name'] = "Timeline"