Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationActive directory integration problem.Active directory integration problem.
Previous
 
Next
New Post
11/6/2008 5:15 AM
 

You have to do something like below in the dnn code, compile it and replace the dll.

Place a code line like below in AuthenticationController class:

UserController.AddUserRoles(_portalSettings.PortalId, objDNNUser)

Instead of:

                    ' Synchronize role membership if it's required in settings
                    If _config.SynchronizeRole Then
                        objAuthUser = objAuthUserController.GetUser(LoggedOnUserName)

                        ' user object might be in simple version in none active directory network
                        If Not objAuthUser.GUID.Length = 0 Then
                            objAuthUser.UserID = intUserId
                            UserController.AddUserRoles(_portalSettings.PortalId, objAuthUser)
                        End If
                    End If

Hope this would help you..

Regards,

Shantha.

 
New Post
11/6/2008 4:42 PM
 

Isn't that just a way to code in a change to remove the role synchronization?  If that is all you want to do, there is no need to change the code, just uncheck the synchronization option in the Authention menu.

What Shalinda wants to do in that scenario is that users are supposed to be synchronized with "something" so that when they log in, so they are automatically placed in the correct security roles in DNN.  The big problem with this scenario is that the "something" isn't defined.  The built-in synchronization functions do that with AD, but that does not appear to be an option or desire, hence the delimma...  

The problem is that in order to do synchronization, there has to be a list "somewhere" of what user is supposed to be in what roles.  Where is that list?  If the users are already in DNN, then synchronization is not required, they can be added to the appropriate security roles and the problem is solved.  If the users are NOT in DNN, then there is no way to "automatically" add them to a role without an outside list, you have to wait until they log into DNN the first time, and then add them to the appropriate rules.

 
New Post
11/10/2008 9:37 PM
 

Mike Horton wrote
 

Shalinda

The only way you're going to be able to automatically put people into DNN roles with the AD Provider is to sync them against the AD groups unless you extend the provider specifically for your situation.

 

 

hi mike,

As you said, If I am to extend the code to my requirment, do you know at which place I should do the change? and do you have any suggesions about the change required there ? ( get the user's role from DNN database and assign it at login)

 

thanks

Shalinda

 
New Post
11/11/2008 11:33 AM
 

Forgive me if this makes no sense, but I'm a bit confused by this.  You want to write a custom provider that pulls role membership from the DNN database?

 
New Post
11/11/2008 10:15 PM
 

Hi Dan,

Thanks for your help. I did not want to sync the AD roles with DNN roles. Yes I wanted to pull the logged in users DNN role at the point of login so that they will see all their intended pages.

I have a seperate windows service running which will update DNN user list with what ever changes in AD (add/edit/delete users from AD). I made this windows service to use the DNN Stored procedures (adduser/updateuser/deleteuser). So when the AD user list propogated to DNN user list,they will have registered users and subscribers roles assigned by default. Then DNN admin will will add them New DNN roles (custom roles) as and when required. So when the users loged in, they will see the pages restrcted to the assigned Roles.

Anyway i made few changes on authenticationLogon() method in authenticationController class to make the DNN portal work tha way I wanted. When validating user from the windows credentials ( in  authenticationLogon() method) username takes the following form - domainname\username. but in DNN DB username is stored as is.

 For example

windows credentials - tsaep\sfernando but in DNN DB its recorded as sfernando only.

So I wrote few codes to take the domainname part off from the loginusername and then it worked.

thanks for all your help guys..

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationActive directory integration problem.Active directory integration problem.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out