cfpb / hmda-platform-ui

Front-end for https://github.com/cfpb/hmda-platform
Creative Commons Zero v1.0 Universal
11 stars 15 forks source link

Message to users without an associated LEI #1114

Closed keileyo closed 5 years ago

keileyo commented 6 years ago

Background: We expect that a significant number of 2017 users will have accounts in v2 Keycloak that are not associated with any LEI (~ currently no known LEI for about 600 2017 FIs). The users will be able to log into beta, but will not be associated with an institution. We need the UI to message what we want them to do.

To-do:

Assuming that the token can be used to determine when LEI is missing, the message should be:

"In order to access the HMDA Platform, your institution must have a Legal Entity Identifier (LEI). In order to provide your institution's LEI, please access this form and enter the necessary information, including your HMDA Platform account email address in the "Additional comments" text box. We will apply the update to your account, please check back 2 business days after submitting your information."

ETA the salesforce web form link.

@awolfe76 @chynnakeys @MattPerrine feel free to edit for clarity.

keileyo commented 6 years ago

@awolfe76 I think we want to update this message a tiny bit. I added the second sentence to the message below to account for people who may see this message + the ability to file for other institutions that do have an LEI.

"In order to access the HMDA Platform, your institution must have a Legal Entity Identifier (LEI). It appears that at least one institution associated with your account does not have an LEI on record. In order to provide your institution's LEI, please access this form and enter the necessary information, including your HMDA Platform account email address in the "Additional comments" text box. We will apply the update to your account, please check back 2 business days after submitting your information."

Edit: the link to the webform is https://hmdahelp.consumerfinance.gov/accounthelp/

awolfe76 commented 6 years ago

These are some initial thoughts on different scenarios.

There are a few cases to work through here. And these can be done in steps. The lei and institutions below are Keycloak attributes.

Step 1 (a generic catch all)

No lei found at all

The basic first step is to provide a generic message, like above, saying that we don't have a lei for their 2017 institution and that it needs to be added. This does not provide an details back to the user, but in most cases should be enough to get them started (their login with their email domain should point them in the right direction).

Doing this missed the case of "one or more leis and a greater number of institutions" (in step 2 below), but this is ok for now. If we don't find any leis, just tell them.

Step 2

One or more leis but no institutions

This would be a new registration in for 2018 filing and is ok.

One or more leis and an equal number of institutions

This would have come from our migration of data and is also ok. A user can not register twice, so our migrated data had good matches in this case.

One or more leis and a greater number of institutions

In this case we were unable to match the previous filing year institution(s) to one or more lei(s). We can go ahead and call the v2 API, /institutions/<lei>, and, if successful, remove the institutionId2017 from that response from the list of institutions from the keycloak token because we'll know its good. After this "clean up" we'll have the list of institutions without an lei (that we know of). Then, we'll have to query the v1 institution API (by id, /institutions/<institutionID>) in order to show a better warning/error message per institution without a matching lei.

No lei and at least one institutions

If there is no lei we know something is wrong. We'll have to follow the steps above in order to render a better warning/error. We just don't have to make the initial v2 API call (again, there's no lei to make the call with).

No lei and no institutions

This case should not happen.

One or more leis and a lesser number of institutions

This is ok. This is likely a good match on the migration and then a user requested a new institution later, based on the lei.

awolfe76 commented 5 years ago

Closed by #1155