wagtail-2fa icon indicating copy to clipboard operation
wagtail-2fa copied to clipboard

Custom permission middleware removes Enable 2fa from group permissions

Open martinjobb opened this issue 4 years ago • 0 comments

Thanks for a great app!

I needed to extend wagtail_2fa.middleware.VerifyUserPermissionsMiddleware to make it work in a headless context and it made the register_permissions hook not fire.

I think it's this line https://github.com/labd/wagtail-2fa/blob/master/src/wagtail_2fa/wagtail_hooks.py#L72.

I implemented a custom hook that did basically the same thing, but it would be nice if possible to make a more generic check.

martinjobb avatar Feb 03 '21 08:02 martinjobb