Right now, the front end manages the logic on what tier to display users at for each profile type. For example, if a user is listed as Geospatial Tier 1, then has someone "upgrade" them to Tier 2, the Tier 1 record remains, but the front end handles how to show which via a simple max(). However, this can cause issues when downgrading users.
Proposed fix: include a conditional in the route for assigning new profile tiers that deletes the existing record if user already has one assigned for that type.
Right now, the front end manages the logic on what tier to display users at for each profile type. For example, if a user is listed as Geospatial Tier 1, then has someone "upgrade" them to Tier 2, the Tier 1 record remains, but the front end handles how to show which via a simple
max()
. However, this can cause issues when downgrading users.Proposed fix: include a conditional in the route for assigning new profile tiers that deletes the existing record if user already has one assigned for that type.