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:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
Please add 6 and 3 and type the answer here:
 

Live Comment Preview:

 
«October»
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678