uselagoon / lagoon

Lagoon, the developer-focused application delivery platform
https://docs.lagoon.sh/
Apache License 2.0
548 stars 147 forks source link

fix: check if user has attributes before accessing attributes #3759

Closed shreddedbacon closed 2 days ago

shreddedbacon commented 4 days ago

General Checklist

Database Migrations

3675 introduced last_accessed attribute to users. Most users get an attribute added to them when they are created, but users created via an IDP do not. This is just a quick fix to check that attributes exist before trying to access the attribute value.

Also moves the lastaccessed call to apollo so it is only called once on the initial request, rather than every haspermission check