Skip to content

Commit

Permalink
remove user model va_profile (#24204)
Browse files Browse the repository at this point in the history
* remove user model va_profile

* removes extra ADR file
  • Loading branch information
John Bramley authored May 5, 2021
1 parent db83a74 commit a3fa482
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .adr-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/adr
23 changes: 23 additions & 0 deletions docs/adr/0007-remove-user-model-va-profile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 7. remove user model va_profile

Date: 2021-05-04

Whom:
- John Bramley
- Trevor Bosaw

## Status

Pending

## Context

As part of the larger effort to [refactor the User & Identity on vets-api](https://app.zenhub.com/workspaces/vsp-identity-5f5bab705a94c9001ba33734/issues/department-of-veterans-affairs/va.gov-team/21012), we have decided to more tightly control access to user attributes through specific & improved getter methods. The `va_profile` methods on the User class revealed too much information about a user's MPI profile and has been rendered uneccessary by the updated getter methods.

## Decision

The decision made is to transfer the User's `va_profile_status` and `va_profile_error` methods to `mpi_status` and `mpi_error` since that is what they are abstractions of, and to remove the `va_profile` method entirely in favor of relying on getter methods for specific attributes.

## Consequences

We expect this to streamline and simplify interaction with a user's attributes; the rest of vets-api will increasingly be able to invoke the getter method for a specific attribute and be confident that the value returned is the one it wants instead of having to directly involve itself in where and how that attribute value was obtained.

0 comments on commit a3fa482

Please sign in to comment.