예제 #1
0
    def list_submissions():
        """ List submission IDs associated with the current user """
        filter_by = request.args.get('filter_by')
        filter_by = filter_by.lower() if filter_by is not None else filter_by
        accountManager = AccountHandler(request,bcrypt = bcrypt)

        if filter_by == 'agency':
            return RouteUtils.run_instance_function(accountManager, accountManager.listSubmissionsByCurrentUserAgency)
        return RouteUtils.run_instance_function(accountManager, accountManager.listSubmissionsByCurrentUser)
예제 #2
0
 def reset_password():
     """ Removes current password from DB and sends email with token for user to reset their password.  Expects 'email' key in request body. """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.resetPassword,
                                             RouteUtils.SYSTEM_EMAIL,
                                             session)
예제 #3
0
 def register_user():
     """ Expects request to have keys 'email', 'name', 'cgac_code', and 'title' """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.register,
                                             getSystemEmail=True,
                                             getSession=True)
예제 #4
0
 def checkEmailToken():
     """ Expects request to have token  """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(
         accountManager,
         accountManager.checkEmailConfirmationToken,
         getSession=True)
예제 #5
0
 def complete_generation(generationId):
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.completeGeneration,
                                             generationId)
예제 #6
0
 def get_protected_files():
     """ Return signed URLs for all help page files """
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.getProtectedFiles)
예제 #7
0
 def generate_file():
     """ Generate file from external API """
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.generateFile)
예제 #8
0
 def check_generation_status():
     """ Return status of file generation job """
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.checkGeneration)
예제 #9
0
 def submit_files():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.submit,
                                             LoginSession.getName(session),
                                             RouteUtils.CREATE_CREDENTIALS)
예제 #10
0
 def email_users():
     """
     Sends email notifications to users that their submission is ready for review & publish viewing
     """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.emailUsers,
                                             RouteUtils.SYSTEM_EMAIL,
                                             session)
예제 #11
0
 def list_users():
     """ list all users """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.listUsers)
 def change_status():
     """ Expects request to have keys 'user_email' and 'new_status' """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.changeStatus,getSystemEmail = True)
예제 #13
0
 def list_submissions():
     """ List submission IDs associated with the current user """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.listSubmissionsByCurrentUser)
 def finalize_submission():
     fileManager = FileHandler(request,isLocal=IS_LOCAL, serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager, fileManager.finalize)
 def upload_local_file():
     fileManager = FileHandler(request,isLocal=IS_LOCAL, serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager, fileManager.uploadFile)
예제 #16
0
 def current_user():
     """ gets the current user information """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.getCurrentUser,
                                             getSession=True)
예제 #17
0
 def logout():
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.logout,
                                             getSession=True)
예제 #18
0
 def max_login():
     accountManager = AccountHandler(request)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.max_login,
                                             session)
예제 #19
0
 def logout():
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.logout, getSession = True)
예제 #20
0
 def list_agencies():
     """ List all CGAC Agencies """
     domainHandler = DomainHandler()
     return RouteUtils.run_instance_function(domainHandler, domainHandler.listAgencies)
예제 #21
0
 def login():
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.login, session)
 def current_user():
     """ gets the current user information """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.getCurrentUser, getSession = True)
 def reset_password():
     """ Removes current password from DB and sends email with token for user to reset their password.  Expects 'email' key in request body. """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.resetPassword, True,True)
 def set_password():
     """ Set a new password for specified user """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.setNewPassword)
예제 #25
0
 def list_users_with_status():
     """ Expects request to have key 'status', will list all users with that status """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(
         accountManager, accountManager.listUsersWithStatus)
예제 #26
0
 def set_skip_guide():
     """ Sets skip_guide param for current user """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.setSkipGuide,
                                             getSession=True)
예제 #27
0
 def set_password():
     """ Set a new password for specified user """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.setNewPassword,
                                             getSession=True)
 def checkPasswordToken():
     """ Expects request to have email  """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.checkPasswordToken, getSession = True)
예제 #29
0
 def set_skip_guide():
     """ Sets skip_guide param for current user """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.setSkipGuide, getSession = True)
 def checkEmailToken():
     """ Expects request to have token  """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.checkEmailConfirmationToken, getSession = True)
예제 #31
0
 def submit_files():
     fileManager = FileHandler(request,isLocal=IS_LOCAL, serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager, fileManager.submit, getUser=True,getCredentials=True)
 def register_user():
     """ Expects request to have keys 'email', 'name', 'agency', and 'title' """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager,accountManager.register, getSystemEmail = True, getSession = True)
 def submission_error_metrics():
     fileManager = FileHandler(request,isLocal=IS_LOCAL ,serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager, fileManager.getErrorMetrics)
 def confirm():
     """ Expects request to have email  """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.createEmailConfirmation, True,True)
 def get_rss():
     fileManager = FileHandler(request,isLocal=IS_LOCAL, serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager, fileManager.getRss)
예제 #36
0
 def list_users():
     """ list all users """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.listUsers)
예제 #37
0
 def check_status():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.getStatus)
 def list_users_with_status():
     """ Expects request to have key 'status', will list all users with that status """
     accountManager = AccountHandler(request,bcrypt = bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.listUsersWithStatus)
예제 #39
0
 def get_obligations():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.getObligations)
예제 #40
0
 def submission_error_metrics():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.getErrorMetrics)
예제 #41
0
 def finalize_submission():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.finalize)
예제 #42
0
 def update_user():
     """ Updates editable fields for the specified user """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager,
                                             accountManager.updateUser,
                                             getSystemEmail=True)
예제 #43
0
 def submission_warning_reports():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(
         fileManager, fileManager.getErrorReportURLsForSubmission, True)
예제 #44
0
 def confirm():
     """ Expects request to have email  """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(
         accountManager, accountManager.createEmailConfirmation, True, True)
예제 #45
0
 def upload_local_file():
     fileManager = FileHandler(request,
                               isLocal=IS_LOCAL,
                               serverPath=SERVER_PATH)
     return RouteUtils.run_instance_function(fileManager,
                                             fileManager.uploadFile)
예제 #46
0
 def checkPasswordToken():
     """ Expects request to have email  """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(
         accountManager, accountManager.checkPasswordToken, getSession=True)
예제 #47
0
 def list_agencies():
     """ List all CGAC Agencies """
     domainHandler = DomainHandler()
     return RouteUtils.run_instance_function(domainHandler,
                                             domainHandler.listAgencies)
예제 #48
0
 def update_user():
     """ Updates editable fields for the specified user """
     accountManager = AccountHandler(request, bcrypt=bcrypt)
     return RouteUtils.run_instance_function(accountManager, accountManager.updateUser, getSystemEmail = True)