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 modified
current_user_guid (str): GUID of the current user
agency_ein (str): Agency the user is being added to

Returns:


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_ein

Args:
modified_user_guid (str): GUID of the user to be modified
current_user_guid (str): GUID of the current user
agency_ein (str): Agency the user is being removed from

Returns:


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

Source code