parameters: (user, model_class, action, *args, **kwargs)
return_statement: return (result, access_instance.messages)
docstring: Return T/F permission and summary of problems with the action.
docstring_summary: Return T/F permission and summary of problems with the action.
docstring_tokens: Return T / F permission and summary of problems with the action .
function: def check_user_access_with_errors(user, model_class, action, *args, **kwargs):
      """
      Return T/F permission and summary of problems with the action.
      """
      access_class = access_registry[model_class]
      access_instance = access_class(user, save_messages=True)
      access_method = getattr(access_instance, 'can_%s' % action, None)
      result = access_method(*args, **kwargs)
      logger.debug('%s.%s %r returned %r', access_instance.__class__.__name__, access_method.__name__, args, result)
      return (result, access_instance.messages)
function_tokens: def check_user_access_with_errors ( user , model_class , action , * args , * * kwargs ) : access_class = access_registry [ model_class ] access_instance = access_class ( user , save_messages = True ) access_method = getattr ( access_instance , 'can_%s' % action , None ) result = access_method ( * args , * * kwargs ) logger . debug ( '%s.%s %r returned %r' , access_instance . __class__ . __name__ , access_method . __name__ , args , result ) return ( result , access_instance . messages )