Skip to content

Commit 1963c5c

Browse files
Access denied action in home added
1 parent e9d9e9b commit 1963c5c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ApiIntegrationMvc/Areas/Home/Controllers/HomeController.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ApiIntegrationMvc.Areas.Account.Models;
2+
using Microsoft.AspNetCore.Authorization;
23
using Microsoft.AspNetCore.Mvc;
34
using SharedLibrary.Cache;
45
using System.Collections.Generic;
@@ -19,7 +20,7 @@ public class HomeController : Controller
1920

2021

2122
public HomeController(ICacheAccessProvider tokens) => _tokens = tokens;
22-
23+
2324
public IActionResult Index(CancellationToken ct)
2425
{
2526
return View();
@@ -31,9 +32,13 @@ public IActionResult Privacy()
3132
return View();
3233
}
3334

35+
public IActionResult Denied()
36+
{
37+
TempData["Toast"] = "Your permissions have been updated.";
38+
return RedirectToAction("Index", "Home", new { area = "Home" });
39+
}
3440

3541

36-
3742

3843
}
3944
}

0 commit comments

Comments
 (0)