Pronovix / password_enhancements

0 stars 3 forks source link

Invalidate caches when "Always require password at registration" changes #15

Open mxr576 opened 5 years ago

mxr576 commented 5 years ago

If "user/register" form is in the render cache then changing "Always require password at registration" option does not add or remove the password field from the form.

mxr576 commented 5 years ago

Cache tags/context on the user/register page. image

mxr576 commented 5 years ago

Also, if the above-mentioned option is enabled then when the authenticated user role's password policy changes then the user/register form's render array must be also removed from the page cache.

image

Maybe if this option is enabled then we should disable the page cache on the user/register completely? Or only the correct cache tags are missing from the policy config entity object? Like the entity ids of the roles, ex.: config:user.role.anonymous, config:user.role.authenticated.