mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #19826 from hvitved/csharp/function-auth-test
C#: Add another test for `MissingAccessControl.ql`
This commit is contained in:
@@ -41,6 +41,14 @@ public class ProfileController : Controller
|
|||||||
doThings();
|
doThings();
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GOOD: The Authorize attribute is used.
|
||||||
|
[Authorize("foo")]
|
||||||
|
public ActionResult Delete5(int id)
|
||||||
|
{
|
||||||
|
doThings();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
|||||||
Reference in New Issue
Block a user