Add get_display_name to BaseUser interface - #70583
Merged
pierrejeambrun merged 4 commits intoJul 28, 2026
Merged
Conversation
The audit log's owner_display_name always equalled owner because the action logger stored get_name() in both fields. Add a get_display_name() to the auth manager user model, defaulting to get_name() so auth managers written before it keep working unchanged, and have the FAB user return its full name. The action logger now records get_display_name() as owner_display_name, so the audit log can show a friendlier name than the raw owner identifier where one exists. Follow-up to apache#68833.
pierrejeambrun
marked this pull request as ready for review
July 28, 2026 09:25
pierrejeambrun
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
rawwar,
shubhamraj-git and
vincbeck
as code owners
July 28, 2026 09:25
get_display_name to BaseUser interface
Member
Author
|
Also adjust the front-end filter so we are now searching for 'owner_display_name' instead. This way 'Thor' will work. |
amoghrajesh
approved these changes
Jul 28, 2026
The audit log user column now shows owner_display_name, so its filter should match that value. Add server-side pattern and prefix-pattern search params on owner_display_name and point the existing User filter at them, and drop the redundant UI owner fallback so the displayed value and the filter stay in sync.
pierrejeambrun
requested review from
bbovenzi,
guan404ming,
ryanahamilton and
vatsrahul1001
as code owners
July 28, 2026 09:59
A real Request built from a minimal ASGI scope supplies genuine empty headers/query/path params, so nothing needs stubbing and the test cannot drift from the real request interface. The session stays a spec'd mock to capture the logged row.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #68833.
That PR exposed
owner_display_namein the audit log, but the action-logging decorator storeduser.get_name()in bothownerandowner_display_name, so the new column always matched the existing owner column — no visible benefit.This adds a
get_display_name()to the auth manager user model so the two can differ:BaseUser.get_display_name()is not abstract and defaults toget_name(), so auth managers written before this method existed keep working unchanged.get_full_name()).action_loggingnow recordsget_display_name()inowner_display_namewhileownerkeeps the raw identifier (get_name()), so the audit log can show a friendlier name where the auth manager provides one (and falls back toownereverywhere else).The simple auth manager only knows a username, so it intentionally has no override and uses the inherited fallback.
For

SimpleAuthManager, nothing changes. (display_name = name), new method isn't overriden:For

FabAuthManager, which implementsget_display_nameas aget_full_name:Filtering

Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines