This project is read-only.

Merging Orchard.Users and Orchard.Roles in one module

Topics: Administration, Customizing Orchard
Nov 9, 2012 at 12:23 PM

Hi there,

I have a question about merging these two modules into new one, and then further extension of that new module. Is it possible to do this, or to somehow extend current modules with the new one?

I've tried to copy code logic from existing modules, but table names, references in core modules and other stuff makes code unusable.


Can you give me some hints, I'm rather new in orchard development.


Sorry if not very clear about my request.

Nov 10, 2012 at 6:40 AM

Why would you want to do that?

Nov 13, 2012 at 8:16 AM

Task from my superior.

Nov 13, 2012 at 8:31 AM

Why does he want you to do that? I wonder what his reasoning behind this task is.

Nov 13, 2012 at 8:40 AM

Extend functionality with some other stuff, as far as I know he wants to include Azure AD also in this process. Not 100% sure how.

Nov 16, 2012 at 3:24 PM

Is it possible to override Orchard.Users AccountController with my own controller, and to route actions from User.cshtml to my controller, without changing User.cshtml.

I've already tried OrchardSuppressDependency, and the only think I got is that action in Orchard.Users.AccountController is not called.

Nov 16, 2012 at 4:39 PM

Set up a custom route with a high priority (try a value >= 100) that points to your AccountController. 

Nov 23, 2012 at 9:47 AM

Is it possible to extend Orchard.Roles module with one more field ( e.g. isExternalRole ) and how ?

I have my module and successfully extended Orchard.Users module, but have no clue how to do this for roles. 

Nov 26, 2012 at 10:17 PM

I don't think you can do that, except by replacing the whole module.

Nov 27, 2012 at 7:57 AM

I've overrided RolesService and added additional class with Fk to roles record, so I've managed somehow to implement this. However my Roles service had to be derived from IRolesService and my ICustomRolesService, and the problem is solved :)