parameters: (method)
return_statement: return wrapper
docstring: Checks to see if a user has been authenticated
docstring_summary: Checks to see if a user has been authenticated
docstring_tokens: Checks to see if a user has been authenticated
function: def known_user(method):
      ''' Checks to see if a user has been authenticated '''
  
      @functools.wraps(method)
      def wrapper(self, *args, **kwargs):
          if self.get_current_user() is not None:
              return method(self, *args, **kwargs)
          else:
              self.set_status(403)
              self.write({"errors": ["You are not authenticated"]})
      return wrapper
function_tokens: def known_user ( method ) : @ functools . wraps ( method ) def wrapper ( self , * args , * * kwargs ) : if self . get_current_user ( ) is not None : return method ( self , * args , * * kwargs ) else : self . set_status ( 403 ) self . write ( { "errors" : [ "You are not authenticated" ] } ) return wrapper