app/soc/views/helper/access.py
changeset 1177 53c802c2a2e2
parent 1176 c211191e7d81
child 1179 427d2ec42823
equal deleted inserted replaced
1176:c211191e7d81 1177:53c802c2a2e2
   445       self.deny(django_args)
   445       self.deny(django_args)
   446 
   446 
   447     if self.user.link_id == django_args[field_name]:
   447     if self.user.link_id == django_args[field_name]:
   448       return
   448       return
   449 
   449 
   450     raise out_of_band.AccessViolation()
   450     raise out_of_band.AccessViolation(DEF_NOT_YOUR_ENTITY_MSG)
   451 
   451 
   452   def checkIsUnusedAccount(self, django_args):
   452   def checkIsUnusedAccount(self, django_args):
   453     """Raises an alternate HTTP response if Google Account has a User entity.
   453     """Raises an alternate HTTP response if Google Account has a User entity.
   454 
   454 
   455     Args:
   455     Args:
   595     entity = request_logic.getForFields(fields, unique=True)
   595     entity = request_logic.getForFields(fields, unique=True)
   596 
   596 
   597     if entity and (entity.scope.status not in ['invalid', 'inactive']):
   597     if entity and (entity.scope.status not in ['invalid', 'inactive']):
   598       return
   598       return
   599 
   599 
   600     raise out_of_band.AccessViolation(message_fmt=DEF_CANNOT_CREATE_MSG)
   600     raise out_of_band.AccessViolation(message_fmt=DEF_NO_REQUEST_MSG)
   601 
   601 
   602   def checkIsMyGroupAcceptedRequest(self, django_args):
   602   def checkIsMyGroupAcceptedRequest(self, django_args):
   603     """Checks whether the user can accept the specified request.
   603     """Checks whether the user can accept the specified request.
   604     """
   604     """
   605 
   605