Skip to content

Commit

Permalink
AccountManage 加入授權設定
Browse files Browse the repository at this point in the history
  • Loading branch information
malagege committed Aug 17, 2022
1 parent 81612ab commit bc5bb3f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
20 changes: 20 additions & 0 deletions AuthSample/Controllers/AccountManageController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace AuthSample.Controllers
{
[Authorize]
public class AccountManageController : Controller
{
public IActionResult Index()
{
return View();
}

[AllowAnonymous]
public IActionResult Test()
{
return View();
}
}
}
6 changes: 6 additions & 0 deletions AuthSample/Views/AccountManage/Index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
測試登入頁
7 changes: 7 additions & 0 deletions AuthSample/Views/AccountManage/Test.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

Test

0 comments on commit bc5bb3f

Please sign in to comment.