Suppress Dependency on Orchard.Users

Topics: Customizing Orchard, General, Troubleshooting, Writing modules
Jul 1, 2014 at 10:41 AM
Hello, I have a problem with Orchard Suppress Dependency. I copied AdminController from Orchard.Users.Conntrollers into my custom module, modified the namespace and added
[OrchardSuppressDependency("Orchard.Users.Controllers.AdminController")]
public class AdminController : Controller, IUpdateModel
above the class, and I copied the views that this controller uses, when I start debugging I get an error: "The controller for path '/MySiteName/Admin/Users' was not found or does not implement IController." Can someone help, am I doing it wrong?
Jul 1, 2014 at 12:07 PM
You have to override the route (imho) so that ALL the user related urls point to your module instead of pointing to the 'core' ones.
Jul 1, 2014 at 2:42 PM
Edited Jul 1, 2014 at 2:42 PM
I thought the purpose of Suppress Dependency was to implement you own functionality without having to mess around with routes... :S
Jul 1, 2014 at 2:46 PM
GRaven13 wrote:
I thought the purpose of Suppress Dependency was to implement you own functionality without having to mess around with routes... :S
This only goes for services (again, imho). That attribute only excludes the class from being exposed through autofac.