-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ReCaptchaLoginFilter (#15736)
- Loading branch information
1 parent
9688beb
commit cd9f9f4
Showing
55 changed files
with
1,165 additions
and
512 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaForgotPasswordFormDisplayDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Threading.Tasks; | ||
using OrchardCore.DisplayManagement.Handlers; | ||
using OrchardCore.DisplayManagement.Views; | ||
using OrchardCore.ReCaptcha.Configuration; | ||
using OrchardCore.Settings; | ||
using OrchardCore.Users.Models; | ||
|
||
namespace OrchardCore.ReCaptcha.Drivers; | ||
|
||
public sealed class ReCaptchaForgotPasswordFormDisplayDriver : DisplayDriver<ForgotPasswordForm> | ||
{ | ||
private readonly ISiteService _siteService; | ||
|
||
public ReCaptchaForgotPasswordFormDisplayDriver(ISiteService siteService) | ||
{ | ||
_siteService = siteService; | ||
} | ||
|
||
public override async Task<IDisplayResult> EditAsync(ForgotPasswordForm model, BuildEditorContext context) | ||
{ | ||
var _reCaptchaSettings = (await _siteService.GetSiteSettingsAsync()).As<ReCaptchaSettings>(); | ||
|
||
if (!_reCaptchaSettings.IsValid()) | ||
{ | ||
return null; | ||
} | ||
|
||
return View("FormReCaptcha", model).Location("Content:after"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...hardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaResetPasswordFormDisplayDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Threading.Tasks; | ||
using OrchardCore.DisplayManagement.Handlers; | ||
using OrchardCore.DisplayManagement.Views; | ||
using OrchardCore.ReCaptcha.Configuration; | ||
using OrchardCore.Settings; | ||
using OrchardCore.Users.Models; | ||
|
||
namespace OrchardCore.ReCaptcha.Drivers; | ||
|
||
public sealed class ReCaptchaResetPasswordFormDisplayDriver : DisplayDriver<ResetPasswordForm> | ||
{ | ||
private readonly ISiteService _siteService; | ||
|
||
public ReCaptchaResetPasswordFormDisplayDriver(ISiteService siteService) | ||
{ | ||
_siteService = siteService; | ||
} | ||
|
||
public override async Task<IDisplayResult> EditAsync(ResetPasswordForm model, BuildEditorContext context) | ||
{ | ||
var _reCaptchaSettings = (await _siteService.GetSiteSettingsAsync()).As<ReCaptchaSettings>(); | ||
|
||
if (!_reCaptchaSettings.IsValid()) | ||
{ | ||
return null; | ||
} | ||
|
||
return View("FormReCaptcha", model).Location("Content:after"); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/OrchardCore.Modules/OrchardCore.ReCaptcha/Drivers/RegisterUserFormDisplayDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Threading.Tasks; | ||
using OrchardCore.DisplayManagement.Handlers; | ||
using OrchardCore.DisplayManagement.Views; | ||
using OrchardCore.ReCaptcha.Configuration; | ||
using OrchardCore.Settings; | ||
using OrchardCore.Users.Models; | ||
|
||
namespace OrchardCore.ReCaptcha.Drivers; | ||
|
||
public sealed class RegisterUserFormDisplayDriver : DisplayDriver<RegisterUserForm> | ||
{ | ||
private readonly ISiteService _siteService; | ||
|
||
public RegisterUserFormDisplayDriver(ISiteService siteService) | ||
{ | ||
_siteService = siteService; | ||
} | ||
|
||
public override async Task<IDisplayResult> EditAsync(RegisterUserForm model, BuildEditorContext context) | ||
{ | ||
var _reCaptchaSettings = (await _siteService.GetSiteSettingsAsync()).As<ReCaptchaSettings>(); | ||
|
||
if (!_reCaptchaSettings.IsValid()) | ||
{ | ||
return null; | ||
} | ||
|
||
return View("FormReCaptcha", model).Location("Content:after"); | ||
} | ||
} |
64 changes: 0 additions & 64 deletions
64
src/OrchardCore.Modules/OrchardCore.ReCaptcha/ReCaptchaLoginFilter.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.