
utils.py
About this file
It handles the user utilities to:
Make the specified user an admin for the agency,
Remove the specified users permissions for the agency identified by agency_ein,
Update the ElasticSearch index assigned_users for the provided request IDs,
Code Check Report
No problems to report
Documentation drawn from source code
make_user_admin(self, modified_user_guid: str, current_user_guid: str, agency_ein: str):
Make the specified user an admin for the agency.Args:modified_user_guid (str): GUID of the user to be modifiedcurrent_user_guid (str): GUID of the current useragency_ein (str): Agency the user is being added toReturns:
remove_user_permissions(self, modified_user_guid: str, current_user_guid: str, agency_ein: str, action: str = None):
Remove the specified users permissions for the agency identified by agency_einArgs:modified_user_guid (str): GUID of the user to be modifiedcurrent_user_guid (str): GUID of the current useragency_ein (str): Agency the user is being removed fromReturns:
es_update_assigned_users(self, request_ids: list):
Update the ElasticSearch index assigned_users for the provided request IDs.Args:request_ids (list): List of Request IDs