title: Check authorize(Role) inside controller in MVC4
body: <p>I create a controller in my project .</p>
  
  <pre><code>         [Authorize(Roles = "Admin")]
          private StudentRepositor obj = new StudentRepositor();
          public ActionResult Index()
          {
  
              var model = obj.GetStudentlist();
              foreach (var stu in model)
              {
                  stu.State = (stu.State == "1") ? "فعال" : "غیرفعال ";
              }
              return View(model);
          }
  </code></pre>
  
  <p>I want to check the permission inside my controller not outside .</p>
  
  <p>For example some thing like this :</p>
  
  <pre><code> public ActionResult Index()
              {
  
                 if(Role=admin) return view2
                 if(role=teacher) return view1
              }
  </code></pre>
  
  <p>Can i do something like this ?!!</p>
  
  <p>Best regards</p>