def pub_check_user(self, func, *args, **kwargs):
    '''
    #Check that the user is authenticated and known.
    
    if "request" not in kwargs:
      raise Exception("Request not available for XML-RPC %s" % \
                        func.func_name)
    meta = kwargs["request"].META
    if not hasattr(kwargs["request"], "user"):
      raise Exception("Authentication Middleware not installed in settings.")
    
    if not kwargs['request'].user.is_authenticated():
      raise Exception("User not authenticated for XML-RPC %s." % func.func_name)
    else:
      kwargs['user'] = kwargs['request'].user
      # Check that the user can actually make the xmlrpc call
      this_user = kwargs['user']
      if not this_user.get_profile().is_clearinghouse_user:
        raise Exception("Remote user %s is not a clearinghouse user" % (this_user.username))
    '''  
		#right now you can use foo creds for connection		
    if "request" not in kwargs:
      raise Exception("Request not available for XML-RPC %s" % \
                      func.func_name)  
    if not hasattr(kwargs["request"], "user"):
      raise Exception("Authentication Middleware not installed in settings.")
    kwargs['user'] = kwargs['request'].user
    
    return func(*args, **kwargs)

  #modified, checked
  #@check_user
  #@rpcmethod()
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/api/legacyexpedientapi.py/AMLegExpAPI.pub_check_user/original