django-preventconcurrentlogins
django-preventconcurrentlogins copied to clipboard
Allow a preceding middleware to opt out of the check
Hi!
I had a use case where I want certain requests to opt out from the concurrent login check. I implemented that by having a middleware add _allow_concurrent_logins
to the request object with any value that evaluates to True. The preventconcurrentlogins middleware checks for this flag and exits early when it is set.
Figured I'd make a PR in case you are interested in including this.
Thanks, Daniel
Hi! Thanks for the contribution. Been really busy recently so haven't had a chance to review and release new version but will do soon!