mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Add test case for Authorize attribute
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
public class ProfileController : Controller {
|
||||
private void doThings() { }
|
||||
@@ -18,4 +19,12 @@ public class ProfileController : Controller {
|
||||
doThings();
|
||||
return View();
|
||||
}
|
||||
|
||||
// GOOD: The Authorize attribute is used.
|
||||
[Authorize]
|
||||
public ActionResult Delete3(int id) {
|
||||
doThings()
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user