|
namespace MvcApplication1.Controllers { [HandleError] public class HomeController : Controller { public ActionResult Index() { return View(); } [Authorize(Roles = "Managers")] public ActionResult CompanySecrets() { return View(); } [Authorize(Users="domain\\username")] public ActionResult StephenSecrets() { return View(); } } } ////////////////////////////////////// http://www.asp.net/mvc/tutorials ... s-authentication-cs ======================================== 这个例子里, role是 managers. 我怎么知道我的 role 是什么呢?? |