views:

245

answers:

1

I am interested if anyone has experience using DotNetNuke authorization in CSLA.

I would like to be able to use my DotNetNuke roles to be able to assign permissions to my CSLA objects and properties. If I just reference the DNN assemblies won't that create an unwanted dependency in my CSLA business objects?

Would it be easier to build CSLA objects that query the DNN database directly to get role membership?

Thanks...

+1  A: 

You definately do not want to create that dependency with your DNN assembly. Your second suggestion is the way to go.

CSLA uses standard IPrincipal/IIdentity authentication. You can create an object that inherits from the CSLA.Security.BusinessPrincipalBase which uses a CSLA object (e.g. User) that grabs their roles from the DNN database directly. Once you have that authentication integrated, you can place your roles inside your business objects by overriding the AddAuthorizationRules method.

Jamie Wright