Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin-user-details badge still shows "2FA" after disabling 2FA #1568

Closed
bleutzinn opened this issue Dec 29, 2018 · 2 comments
Closed

admin-user-details badge still shows "2FA" after disabling 2FA #1568

bleutzinn opened this issue Dec 29, 2018 · 2 comments

Comments

@bleutzinn
Copy link

Using Grav v1.5.6 and Admin v1.8.15, enabling and then disabling 2FA leaves the admin-user-details badge showing "2FA" in the Admin panel.

This is caused by the Twig partial nav-user-details.html.twig (see line 9) which uses the setting admin.user.twofa_enabled.

This setting is set to true when enabling 2FA but appears not to set to false when 2FA is disabled later on.

As 2FA is not a per user setting but rather system wide a quick fix would be to have the Twig look at admin.twofa_enabled instead.

@rhukster
Copy link
Member

rhukster commented Jan 1, 2019

I will check this out.. thanks.

@rhukster
Copy link
Member

rhukster commented Jan 7, 2019

Actually, 2FA is a user and a system-wide setting...

Disabling 2FA in the plugin just means the option is not available to the user, and not checked if you have 2FA enabled for the user.

The badge indicates that the user has the option enabled. I will add an extra check to ensure both system and user options are checked for the badge to show.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants