django-preventconcurrentlogins icon indicating copy to clipboard operation
django-preventconcurrentlogins copied to clipboard

Allow a preceding middleware to opt out of the check

Open daniel5gh opened this issue 7 years ago • 1 comments

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

daniel5gh avatar Jan 23 '18 16:01 daniel5gh

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!

pcraston avatar Apr 12 '18 08:04 pcraston