I'm using Auth[] attributes on my controller methods to control access to those methods. I would like to determine programmatically if a user has access to a method so that I can be proactive, rather than let mvc raise a login box when a user doesn't have access. Although redirecting to the login page seems to make perfect sense, it doesn't make for very good usability to display a bunch of stuff the user doesn't have access to.
Is it possible to do something like this?
//this is pseudo code
If (user.HasAccess("some controller method")){
//do something
}