yourlabs / django-session-security

A little javascript and middleware work together to ensure that the user was active during the past X minutes in any tab he has open. Otherwise, display a warning leaving a couple of minutes to show any kind of activity like moving the mouse. Otherwise, logout the user.
http://django-session-security.rtfd.org
MIT License
309 stars 142 forks source link

Post session message #129

Open dethorpe opened 4 years ago

dethorpe commented 4 years ago

Completed function for adding post logoff message as a page banner controlled through adding and parsing HTML parameters on refresh.

dethorpe commented 4 years ago

Hi, small feature add. I hope that I am following the right process for contributing. I am certain of one problem, missing mo/po translations for the new message.

All feedback is appreciated!

claytondaley commented 4 years ago

I like the general idea because we have pages where we don't redirect to ensure that we don't lose on-page data. It'd be great if we could notify a user of the timeout.

My (strictly personal) preference would be to use a modal like the existing timeout warning -- except that it doesn't hide on activity. This would also reduce the number of things that would need to be custom styled.

dethorpe commented 4 years ago

I like the general idea because we have pages where we don't redirect to ensure that we don't lose on-page data. It'd be great if we could notify a user of the timeout.

My (strictly personal) preference would be to use a modal like the existing timeout warning -- except that it doesn't hide on activity. This would also reduce the number of things that would need to be custom styled.

You aren't wrong that a modal would be more in kind with the style of the app and I did consider it but at the end of the day my strictly personal preference wanted it this way. You have my blessing if you want to rewrite the feature however you feels, I just hope that this function in some way will work it's way to the next update.