Lazy roles Synchronization in DotNetNuke.

There is a thread: Role SynchronizationMode that asked what the meaning of the parameter in core AddRole method.
I investigated ability to syncronize roles from custom database to DNN and can post answer for this question(according to 4.0.2 core).

Parameter SynchronizationMode is used to implement “lazy” synchronization for roles.

If new role has been added to AspNet_Roles DNN calls synchronization to update satellite dnn_Roles table.

 

Parameter SynchronizationMode is used in RoleController.AddRole to indicate whether the role should be added to both the AspNet_Roles and dnn_Roles(SynchronizationMode=false) or to dnn_Roles only (SynchronizationMode=true).

The common use is to call AddRole(ByVal objRoleInfo As RoleInfo) overload, which corresponds to SynchronizationMode=false.

 

The call stack for syncronization (SynchronizationMode=true )is the following:

DotNetNuke\admin\Security\Roles.ascx.vb: BindData ->

RoleController.GetPortalRoles(PortalId, True)->

RoleController.SynchronizeRoles(PortalId)->

objRoleController.AddRole(objRoleInfo, True)

 

There is also method

RoleController.GetRoleByName(ByVal PortalId As Integer, ByVal RoleName As String, ByVal SynchronizeRoles As Boolean) that also can be called to synchronize roles,  

but I didn’t find that is is called from anywhere with SynchronizeRoles=true.

 

posted @ Tuesday, May 30, 2006 9:24 AM

Print

Comments on this entry:

# re: Lazy roles Synchronization in DotNetNuke.

Left by web development company at 8/11/2009 5:10 AM
Gravatar
That was inspiring,

it is better than using the configuring management

Thanks

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213