app/soc/views/helper/access.py
changeset 1441 e633906ed88d
parent 1438 e484f9acf999
child 1442 8eec34007e80
equal deleted inserted replaced
1440:58ac0b3f59ac 1441:e633906ed88d
   623     if entity:
   623     if entity:
   624       return
   624       return
   625 
   625 
   626     raise out_of_band.AccessViolation(message_fmt=DEF_NO_ACTIVE_ENTITY_MSG)
   626     raise out_of_band.AccessViolation(message_fmt=DEF_NO_ACTIVE_ENTITY_MSG)
   627 
   627 
   628   def checkHasActiveRoleForScope(self, django_args, logic, field_name=None):
   628   def checkHasActiveRoleForScope(self, django_args, logic,
       
   629                                  field_name='scope_path'):
   629     """Checks that the user has the specified active role.
   630     """Checks that the user has the specified active role.
   630     """
   631     """
   631 
       
   632     if not field_name:
       
   633       field_name = 'scope_path'
       
   634 
   632 
   635     django_args['user'] = self.user
   633     django_args['user'] = self.user
   636     self.checkIsActive(django_args, logic, field_name, 'user')
   634     self.checkIsActive(django_args, logic, field_name, 'user')
   637 
   635 
   638   def checkSeeded(self, django_args, checker_name, *args):
   636   def checkSeeded(self, django_args, checker_name, *args):