app/soc/views/helper/access.py
changeset 1475 22b63ab59b27
parent 1466 bfcec687b362
child 1481 0ccf92d073e8
equal deleted inserted replaced
1474:5eaf734fb178 1475:22b63ab59b27
  1272 
  1272 
  1273   def checkCanEditTimeline(self, django_args):
  1273   def checkCanEditTimeline(self, django_args):
  1274     """Checks whether this program's timeline may be edited.
  1274     """Checks whether this program's timeline may be edited.
  1275     """
  1275     """
  1276 
  1276 
  1277     time_line_keyname = django_args['scope_path']
  1277     time_line_keyname = timeline_logic.getKeyFieldsFromFields(django_args)
  1278     timeline_entity = timeline_logic.getFromKeyName(time_line_keyname)
  1278     timeline_entity = timeline_logic.getFromKeyName(time_line_keyname)
  1279 
  1279 
  1280     if not timeline_entity:
  1280     if not timeline_entity:
  1281       # timeline does not exists so deny
  1281       # timeline does not exists so deny
  1282       self.deny(django_args)
  1282       self.deny(django_args)
  1283 
  1283 
  1284     split_keyname = time_line_keyname.rsplit('/')
  1284     fields = program_logic.getKeyFieldsFromFields(django_args)
  1285 
       
  1286     fields = {
       
  1287         'scope_path' : split_keyname[0],
       
  1288         'link_id' : split_keyname[1],
       
  1289         }
       
  1290 
       
  1291     self.checkIsHostForProgram(fields)
  1285     self.checkIsHostForProgram(fields)