Fix user delete flow 9
This commit is contained in:
@@ -99,6 +99,12 @@ class SecurityManager:
|
||||
payload["is_verified"] = user_data["is_verified"]
|
||||
if "is_active" in user_data:
|
||||
payload["is_active"] = user_data["is_active"]
|
||||
|
||||
# ✅ CRITICAL FIX: Include role in access token!
|
||||
if "role" in user_data:
|
||||
payload["role"] = user_data["role"]
|
||||
else:
|
||||
payload["role"] = "user" # Default role if not specified
|
||||
|
||||
logger.debug(f"Creating access token with payload keys: {list(payload.keys())}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user