Skip to content

ui: ignore missing profile attribute in dev admin (bug 2019496)#951

Open
shtrom wants to merge 1 commit intomainfrom
bug2019496/dev-admin-profile-fix
Open

ui: ignore missing profile attribute in dev admin (bug 2019496)#951
shtrom wants to merge 1 commit intomainfrom
bug2019496/dev-admin-profile-fix

Conversation

@shtrom
Copy link
Member

@shtrom shtrom commented Feb 26, 2026

No description provided.

@github-actions
Copy link

View this pull request in Lando to land it once approved.

@shtrom shtrom marked this pull request as ready for review February 26, 2026 07:14
@shtrom shtrom requested a review from a team as a code owner February 26, 2026 07:14
Copy link
Member

@cgsheeh cgsheeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm able to render every page with my admin-enabled account in Lando-dev. In LandoOIDCAuthenticationBackend we create the .profile attribute in the post_auth_hook, so it seems we should have a .profile for any account which goes through the standard auth flow. How are you logging in the admin user where you're seeing this issue? It seems we should send admin accounts through the Profile creation code path (or add a code path to create a Profile manually) instead of adding workarounds.

Copy link
Contributor

@zzzeid zzzeid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will only impact users created via the CLI (e.g., API users, or via our dev scripts). I think a better solution would be to either (1) create a hook that will create a profile for any user not created via that OIDC flow, or (2) handle the missing profile when we run into that issue (i.e., via a backend or middleware).

@zzzeid
Copy link
Contributor

zzzeid commented Feb 26, 2026

I'm able to render every page with my admin-enabled account in Lando-dev. In LandoOIDCAuthenticationBackend we create the .profile attribute in the post_auth_hook, so it seems we should have a .profile for any account which goes through the standard auth flow. How are you logging in the admin user where you're seeing this issue? It seems we should send admin accounts through the Profile creation code path (or add a code path to create a Profile manually) instead of adding workarounds.

The profile creation code path (as it exists today) would not be compatible with the workflows that do not go through OIDC, since there is no association with LDAP in that case (and thus no automatic permissions, or email, etc. as they would be for LDAP accounts). So we should probably have a flag on the profile that is set to make this more explicit in these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants