8000 Show indicator for transient user in user sessions list in admin ui by thomasdarimont · Pull Request #28882 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Show indicator for transient user in user sessions list in admin ui - #28882

Merged
hmlnarik merged 1 commit into
keycloak:mainfrom
thomasdarimont:issue/GH-28879-show-transient-userlabel-in-sessions-list
Apr 19, 2024
Merged

hmlnarik merged 1 commit into
keycloak:mainfrom
thomasdarimont:issue/GH-28879-show-transient-userlabel-in-sessions-list

Conversation

@thomasdarimont
@thomasdarimont thomasdarimont commented Apr 18, 2024 •
Copy link
Copy Markdown
Contributor

This PR adds a transient user indicator to the user sessions listing.

  • For transient users a transient label is now shown in the session list in the admin ui
  • this adds a new boolean property transientUser to org.keycloak.admin.ui.rest.model.SessionRepresentation

Fixes #28879

With this PR applied the UI looks like this:
image

Perhaps there could be a bit more spacing between the label and the username.

@thomasdarimont
thomasdarimont force-pushed the issue/GH-28879-show-transient-userlabel-in-sessions-list branch from 4f44052 to 072e81f Compare April 18, 2024 10:18
@thomasdarimont
thomasdarimont marked this pull request as ready for review April 18, 2024 10:18
@thomasdarimont
thomasdarimont requested a review from a team as a code owner April 18, 2024 10:18
@hmlnarik hmlnarik self-assigned this Apr 18, 2024
@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the PR!

The sessions now display the transientness of users in the main realm Sessions view, but it is not displayed for sessions displayed from a client's Sessions tab. A similar change to the one in the SessionsResource from this PR is needed in ClientResource.

@ahus1 ahus1 changed the title Show indicator for transient user in user sessions list in admin ui (#28879) Show indicator for transient user in user sessions list in admin ui Apr 18, 2024
@thomasdarimont
thomasdarimont force-pushed the issue/GH-28879-show-transient-userlabel-in-sessions-list branch 2 times, most recently from 59054d9 to 1544dec Compare April 18, 2024 16:24
@thomasdarimont
thomasdarimont requested a review from a team as a code owner April 18, 2024 16:24
@thomasdarimont
thomasdarimont commented Apr 18, 2024 •
Copy link
Copy Markdown
Contributor Author

Thanks @hmlnarik for the review!
I had to adapt org.keycloak.representations.idm.UserSessionRepresentation and org.keycloak.models.utils.ModelToRepresentation#toRepresentation(org.keycloak.models.UserSessionModel)

It now looks like that:

Realm Sessions View:
image

Client Sessions View:
image

@thomasdarimont
thomasdarimont force-pushed the issue/GH-28879-show-transient-userlabel-in-sessions-list branch from 1544dec to 9477945 Compare April 18, 2024 16:26
@thomasdarimont
thomasdarimont requested a review from hmlnarik April 18, 2024 16:29
…28879)

For transient users a transient label is now shown in the realm sessions and client sessions list in the admin ui.

Fixes keycloak#28879

Co-authored-by: Thomas Darimont <thomas.darimont@googlemail.com>
Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
@thomasdarimont
thomasdarimont force-pushed the issue/GH-28879-show-transient-userlabel-in-sessions-list branch from 9477945 to 0c602df Compare April 18, 2024 19:02
@hmlnarik hmlnarik left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update @thomasdarimont!

The clients_saml_test.spec.ts failure is not caused by this PR, thus merging.

@hmlnarik
hmlnarik merged commit 6861718 into keycloak:main Apr 19, 2024
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.

Indicate whether a user is transient or not in user sessions list

2 participants

0