Browse Source
Merge pull request #15792 from lprichar/issues/15791-logout-fail
Bug #15791 - Fix log out fails when EnableLocalLogin is false
pull/15796/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
1 deletions
-
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs
|
|
|
@ -1,6 +1,8 @@ |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp.Account.Settings; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Volo.Abp.Settings; |
|
|
|
|
|
|
|
namespace Volo.Abp.Account.Web.Pages.Account; |
|
|
|
|
|
|
|
@ -28,7 +30,12 @@ public class LogoutModel : AccountPageModel |
|
|
|
return RedirectSafely(ReturnUrl, ReturnUrlHash); |
|
|
|
} |
|
|
|
|
|
|
|
return RedirectToPage("/Account/Login"); |
|
|
|
if (await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin)) |
|
|
|
{ |
|
|
|
return RedirectToPage("/Account/Login"); |
|
|
|
} |
|
|
|
|
|
|
|
return RedirectToPage("/"); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual Task<IActionResult> OnPostAsync() |
|
|
|
|