-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow any user to manage two-factor #16130
Conversation
Can we have some unit tests? |
Sorry I don't have much time. But these bugs need to be addressed. If you want to submit test, you're more than welcome to add tests. |
I might suggest adding tests for upcoming PRs to ensure that we don't break anything and improve the quality |
@MikeAlhayek I have a workshop on Saturday, and I need to prepare something, I can review and probably add unit tests after |
I'm reviewing. |
src/OrchardCore/OrchardCore.Admin.Abstractions/AdminAttribute.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Admin.Abstractions/AdminAttribute.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/EmailAuthenticatorController.cs
Outdated
Show resolved
Hide resolved
...hardCore/OrchardCore.Users.Abstractions/Events/ITwoFactorAuthenticationHandlerCoordinator.cs
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Users.Abstractions/Events/ITwoFactorAuthenticationHandler.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Admin/PermissionProvider.cs
Outdated
Show resolved
Hide resolved
@Piedone this one is ready for another review |
src/OrchardCore.Modules/OrchardCore.Users/Controllers/EmailAuthenticatorController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/AuthenticatorAppController.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/SmsAuthenticatorController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Services/UsersThemeSelector.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/TwoFactorAuthenticationStartup.cs
Outdated
Show resolved
Hide resolved
This pull request has merge conflicts. Please resolve those before requesting a review. |
src/OrchardCore.Modules/OrchardCore.Users/Views/TwoFactorAuthentication/Index.cshtml
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Admin.Abstractions/AdminPermissions.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Views/TwoFactorAuthentication/Index.cshtml
Show resolved
Hide resolved
…s.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
…rdCMS/OrchardCore into ma/fix-2fa-admin-attribute
@Piedone I added 2 new layouts to the Blog theme so we have a proper theme for the login and 2FA. Still now sure why does the footer icons in the blog theme look huge when using 2FA. which appears on the main 2FA index only and not the other pages. |
@Piedone Last commit. I undid the changes that I made to the blog theme. That should be done in a separate PR to fix existing issues in the blog theme. Are you good with this now? |
I don't think the Blog theme should contain anything like that, so with that part, yes. However, the net of the last two commits are still changes that I'm confused why are necessary: https://github.com/OrchardCMS/OrchardCore/pull/16130/files/3f9c1d25cf36b69a60cd7e71a0b4caffcf7e23ac..0be22c7c1469bd248f36604e9a14b0ab626c13b2 |
look at the last commit using Using blog theme with the 2FA does not work because the menu seems to cover the disable button. I think that is something we can fix in the theme in a separate PR. |
Why are any of the changes in the last three commits necessary? We don't need to care about 2FA not working with the Blog theme, as mentioned; if one wants to have it on the frontend, one will have a custom theme anyway. |
Well, it all started when you mentioned that the icons are not working with the Blog Theme. Then you had another comment about the icons in the footer showing up very large. And then you had another comment about unable to enable 2FA when you were using the blog theme. In my last commit, at least the icons are fixed. In a follow up PR, we should update the blog theme and the agency theme by providing a layout for the login and the TwoFactor layouts so that both look good by default. |
Yes, but as I followed up under those comments, nothing needs to be done. I was incorrect to bring them up. |
Okay. So do you need any other changes to this PR or should we merge it? |
Yes, please revert what's after my approve. |
de0e7fc
to
3f9c1d2
Compare
done. merging this |
Fix #15335
Fix #16129
Summary of changes
OrchardCore.Users.EmailConfirmation
was removed. This feature was recently added and was enabled by dependency only. It's services have been moved up to theOrchardCore.Users
feature since it is a core functional and needed byOrchardCore.Users
.IsRequiredAsync()
in both theITwoFactorAuthenticationHandlerCoordinator
andITwoFactorAuthenticationHandler
was changed toIsRequiredAsync(IUser user)
.