GroupChatRoleProvider
Last changed: mark.schmalohr

.

GroupChat Role-Provider

What is a GroupChat Role provider?

The purpose of this provider module is to sync DotNetNuke users with the GroupChat Server. The installation is performed in two steps: The ZIP file upload in the DNN Module Definitions installer and adding/editing two configuration sections in the web.config. Adding a user to a configured role will trigger a user transfer to GroupChat Server - in this case the webserver (IIS) will communicate with the GroupChat Server admin interface and port.

Beside this push approach, another user sync option is available. In the Administration-Settings of the GroupChat DNN module a callback authentication can be enabled. Here, the GroupChat Server calls-back the DotNetNuke portal if a user, who is trying to authenticate, is not present. With a positive call-back response, the user will be created on-the-fly - it is a pull mechanism. In this case no additional role provider module needs to be installed.

Notice The callback auth URL requests the user and pass param and replies with auth=0 or auth=1. See a description here, callbackAuth.aspx is also part of the GroupChat module ZIP-File for DotNetNuke: http://www.think5.de/cms/DesktopModules/dnnGroupChat/callbackAuth.aspx

The pull-sync method is suitable for most installations; on sites with very high load, the push-sync method is recommended. Both user sync ways can be used at the same time for best reliability and performance.

How does the Role-Provider work?

The GroupChat Role Provider replaces / inherits the standard implementation of the DotNetNuke Role Provider and extends it with the ability to notify the GroupChat Server of User-Add User-Delete operations in the DotNetNuke portal.

DotNetNuke iteself is based on the ASP.NET Role provider model till version 3.3 / 4.3. All versions above do not use the ASP.NET Role provider model anymore and handle this with a DotNetNuke specific class.

The embedding is done in the web.config file of your portal. Since the Role Provider behaviour changed in DotNetNuke for versions DNN 3.3 / DNN 4.3 and above, the web.config entries are different and therefore described for both versions.

web.config entries

DNN<3.3 rather DNN<4.3

The following entry replaces the DNNSQLRoleProvider entry.

 <roleManager>
    <providers>


        <!-- BEGIN: Role-Provider Snippet 1/1 -->
        <add name="T5SQLRoleProvider"
             type="DotNetNuke.Security.Role.T5SQLRoleProvider, Think5.Provider.T5SQLRoleProvider"
             connectionStringName="SiteSqlServer"
             triggerRole="GroupChatLevel1:NotifyChat:NONE;GroupChatLevel2:NotifyChat:MEMBER;PrivateClubRoom:CreatePublicRoom:RoomType=1,MaxUsers=50,RoomName=privroom_#username#,RoomSalutation=Welcome in the chatroom of #username#,CreateRoomAdmin=true" 
             remoteHost="myservername:8075" 
             applicationName="/" 
             description="Stores and retrieves roles data from the local Microsoft SQL Server database triggering role changes to the groupchat server" /> 
        <!-- END: Role-Provider Snippet 1/1 -->


    </providers>
 </roleManager>

DNN>=3.3 rather DNN>=4.3 (e.g. for current DNN version 4.9.2 or 5.0.0)

The first snippet needs to be added before the closing </appSettings> tag. The second snippet replaces the existing roles node (the complete node starting with <roles defaultProvider="DNNRoleProvider">...</roles> ). Replace myservername with your hostname or IP where GroupChat Server is installed. The address specified here will be accessed by your IIS server, when having GroupChat and IIS installed on the some machine, this can be localhost.

 <appSettings>
 ...


    <!-- BEGIN: Role-Provider Snippet 1/2 -->
       <add key="RPGCTriggerRole" 
          value="GroupChatLevel1:NotifyChat:NONE;GroupChatLevel2:NotifyChat:MEMBER"/>
       <add key="RPGCRemoteHost" value="myservername:8075"/>
    <!-- END: Role-Provider Snippet 1/2 -->


 </appSettings>


 ...


 <dotnetnuke>
 ...


 <!-- BEGIN: Role-Provider Snippet 2/2 -->
    <roles defaultProvider="DNNRoleProvider">
       <providers>
          <clear />
          <add name="DNNRoleProvider" type="DotNetNuke.Security.Role.T5SQLRoleProviderV2, Think5.Provider.T5SQLRoleProvider" providerPath="~\DesktopModules\T5SQLRoleProvider\" />
       </providers>
    </roles>
 <!-- BEGIN: Role-Provider Snippet 2/2 -->


 ...
 </dotnetnuke>
Notice The above example includes instructions like: dnnrolename:NotifyChat:groupchatrole
Example GroupChatLevel2:NotifyChat:MEMBER

A role with name GroupChatLevel2 needs to be added to DotNetNuke (previously) too. With this configuration above, a user who gets assigned to the DotNetNuke-Role GroupChatLevel2 will be transfered/created on the GroupChat Server. Deleting the user from this role will remove the user from the chat.

Transfers are cued if the sync is not possible for any reason. The next sync will also sync the cued items again.

Beside user transfer, the role provider can be configured to set the operator status (these users will see all others on the own website, e.g. for support offerings) to certain users or to create an own chatroom for users belonging to a certain role automatically.

mydnnrole:setusertype:operator

mydnnrole:createpublicroom:RoomType=public,MaxUsers=25,RoomName=My own chatroom,RoomSalutation=Welcome on my chatroom...,CreateRoomAdmin=true

Contribute Add/Edit this topic to extend this documentation with your experiences, questions and best practices.

Home - GroupChatServer Wiki