kristofferahl/FluentSecurity — Issue #14: RequireRole does not apply to base controller actions
Author: ilizunov
Created: 2012-01-29 09:25:48+00:00
State: open

BaseControllerr:
```C#
public abstract class SimpleCrudController : Controller
{
[HttpGet]
public virtual ActionResult Update(string id)
{
//...
}
}
```

Descendant controller:
```C#
public class ManufacturerController : SimpleCrudController
{
}
```

Security:
```C#
configuration.For().RequireRole(Roles.Admin);
```

Test:
```C#
expectations
.Expect(x => x.Update(null))
.HasRole(Roles.Admin);
```

Test result:
```C#
Expected a configuration for controller
"Broxer.Web.Controllers.ManufacturerController", action "Update".
Policycontainer could not be found!
```