# HG changeset patch # User Lennard de Rijk # Date 1233409790 0 # Node ID 64acc3c02ad1a639052c19f20c7522301e705fab # Parent a878188e225c073a9ce43d9b533ed1cc118e5d22 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 diff -r a878188e225c -r 64acc3c02ad1 app/soc/views/models/timeline.py --- 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"