<p>is it possible to create something like <a href="https://web.archive.org/web/20200805044711/http://geekswithblogs.net/AzamSharp/archive/2008/02/24/119946.aspx" rel="nofollow noreferrer">this</a> i ASP.NET MVC beta 1</p>
<p>i have tried but the</p>
<pre><code>override bool OnPreAction(string actionName, 
                          System.Reflection.MethodInfo methodInfo)
</code></pre>
<p>does not exsist anymore and</p>
<pre><code>override void OnActionExecuting(ActionExecutingContext filterContext)
</code></pre>
<p>don't give me access to the action name</p>

In the blogpost you are referring to, the author states that
One way to solve this problem is by using the attribute based security as shown on this post. But then you will have to decorate your actions with the security attribute which is not a good idea.
I think it's a perfectly fine way to go about it and it is supported by the framework. It will give you a nice declarative implementation. Check out the AuthorizeAttribute in System.Web.Mvc. It will allow you to do something like this:
```
```
[Authorize(Roles="Admin, Editor")]
public ActionResult Delete(int id){
    (...)
}
```
```
Since the Delete action alters the state of your system, I would also add an AcceptVerbs attribute like so:
```
```
[AcceptVerbs(HttpVerbs.Post)]
[Authorize(Roles="Admin, Editor")]
public ActionResult Delete(int id){
    (...)
}
```
```
This will make sure that the action will not accept GET requests.