Bug 1028 -Deleted the device admin is not logged out in the browser

Review Request #414 — Created Aug. 16, 2024 and submitted

apoorva.sn
AMP
amp_3_7_0
1028
pmurugaiyan, prajesh, shuinvy

Problem

When Super admin deletes a device admin who is already logged in then once the device admin config is deleted the device admin is not logged out in the browser

Solution

Made changes to remove the session of the deleted user from session pool
session.py contains formatting chages as well

Tested the changes locally
Changes are available in setup: 192.168.162.162

Description From Last Updated

delete_session_by_username(..)

pmurugaiyanpmurugaiyan

Hi Apoorva, This looks fine to me. Just a alternative thought - can we add this implement method as find_session_by_username(username) …

pmurugaiyanpmurugaiyan
pmurugaiyan
  1. 
      
  2. Hi Apoorva,
    This looks fine to me. Just a alternative thought - can we add this implement method as find_session_by_username(username) and reuse the existing logout handler?

    1. Have introduced find_session_by_username in case we need it in future. logout handler is for the current session so thought it is better to keep that seperate as it handles some information w.r.t to cookies which might not be available when we are deleting session of user logged in other browser.
      For now with the current implementation the user is logged out of the session when we delete the user

  3. 
      
apoorva.sn
pmurugaiyan
  1. Ship It!
  2. 
      
shuinvy
  1. Ship It!
  2. 
      
apoorva.sn
Review request changed

Status: Closed (submitted)

Loading...