authentik icon indicating copy to clipboard operation
authentik copied to clipboard

core: add bulk session revocation

Open cdmx-in opened this issue 1 month ago • 6 comments

Pull Request: Add Bulk Session Revocation Functionality for Admins

Details

This PR adds bulk session revocation functionality for Admins. UserBulkRevokeSessionsForm added that allows administrators to revoke all active sessions for selected users, with a confirmation dialog to prevent accidental revocation.

Changes Made

  • Created new UserBulkRevokeSessionsForm.ts component for handling this bulk session revocation
  • Updated UserListPage.ts to integrate the new bulk action with the user list
  • Added user-friendly confirmation workflow image image

Files Changed:

  • web/src/admin/users/UserBulkRevokeSessionsForm.ts (+207 lines)
  • web/src/admin/users/UserListPage.ts (+82/-38 lines)

cdmx-in avatar Dec 03 '25 12:12 cdmx-in

Deploy Preview for authentik-docs ready!

Name Link
Latest commit c7e5516149944a3f16c7531e066eb2c9183ec058
Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/693fa59abf089700085af7eb
Deploy Preview https://deploy-preview-18564--authentik-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 03 '25 12:12 netlify[bot]

Deploy Preview for authentik-integrations ready!

Name Link
Latest commit c7e5516149944a3f16c7531e066eb2c9183ec058
Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/693fa59aac55f700081a103d
Deploy Preview https://deploy-preview-18564--authentik-integrations.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 03 '25 12:12 netlify[bot]

Deploy Preview for authentik-storybook ready!

Name Link
Latest commit c7e5516149944a3f16c7531e066eb2c9183ec058
Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/693fa59a90195900082b89a3
Deploy Preview https://deploy-preview-18564--authentik-storybook.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 03 '25 12:12 netlify[bot]

Codecov Report

:x: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 93.12%. Comparing base (20dbcf2) to head (c7e5516).

Files with missing lines Patch % Lines
authentik/core/api/authenticated_sessions.py 83.33% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18564      +/-   ##
==========================================
- Coverage   93.22%   93.12%   -0.11%     
==========================================
  Files         946      946              
  Lines       51903    51918      +15     
==========================================
- Hits        48388    48348      -40     
- Misses       3515     3570      +55     
Flag Coverage Δ
e2e 44.42% <83.33%> (-0.37%) :arrow_down:
integration 23.22% <0.00%> (-0.06%) :arrow_down:
unit 91.46% <83.33%> (-0.01%) :arrow_down:
unit-migrate 91.51% <83.33%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 03 '25 12:12 codecov[bot]

@rissson, have made the requested changes, please review

cdmx-in avatar Dec 04 '25 17:12 cdmx-in

Just a minor nit, otherwise the backend looks good to me!

Done. :)

cdmx-in avatar Dec 05 '25 21:12 cdmx-in

Requesting a review for this PR, Please review and merge

cdmx-in avatar Dec 15 '25 06:12 cdmx-in

hello, we're in the middle of a release, we'll take a look at this afterwards. Thanks again for your contribution!

rissson avatar Dec 15 '25 12:12 rissson