PaloAltoNetworks / panhandler

Panhandler is a tool to manage config snippets and Skillets for PAN-OS devices
Apache License 2.0
41 stars 19 forks source link

FR: clean up temp file when user logs out #174

Closed nembery closed 4 years ago

nembery commented 4 years ago

We should add some code to attempt to clean up temp files when a user logs out using the user_logged_out signal.

code should be added to cnc/pan_cnc/lib/signals.py and should receive the user_logged_out signal.

Should also add a flag to the users session for any temp files created by them during that session

according to the docs, we can see the session data 'before' the session is actually flushed:

https://github.com/django/django/blob/master/django/contrib/auth/__init__.py#L135