Redirect to home page when access denied.

pull/18064/head
maliming 2 years ago committed by GitHub
parent e407754280
commit 2a1e416a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
@ -61,12 +61,12 @@ public abstract class ChallengeAccountController : AbpController
}
[HttpGet]
public virtual Task<IActionResult> AccessDenied(string returnUrl = "", string returnUrlHash = "")
public virtual Task<IActionResult> AccessDenied()
{
return Task.FromResult<IActionResult>(Challenge(
new AuthenticationProperties
{
RedirectUri = GetRedirectUrl(returnUrl, returnUrlHash)
RedirectUri = "/"
},
(ForbidSchemes.IsNullOrEmpty()
? new[]

Loading…
Cancel
Save