Browse Source

Redirect to home page when access denied.

pull/18064/head
maliming 3 years ago
committed by GitHub
parent
commit
2a1e416a4e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

@ -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