Closed (works as designed)
Project:
Lightweight Directory Access Protocol
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
7 Sep 2011 at 16:28 UTC
Updated:
13 Nov 2019 at 06:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnbarclay commentedThere is no automated upgrade from ldap integration 6 and ldap 7.
As far as roles go, try the current dev version.
Comment #2
jrm402 commentedWill do. I'll try the latest dev release and now I see the beta5 is out - will try that as well.
As far as the upgrade from 6.x to 7, I had reentered all my server details after the upgrade. I had totally uninstalled the latest ladp_integration 6.x version and installed the LDAP Project beta4.
I'll keep you posted on my status. Thanks for your hard work and an awesome module.
Comment #3
johnbarclay commentedThanks. If you are up for it, a page on upgrading from 6 to 7 would be good in the documentation at: http://drupal.org/node/997082
Comment #4
jrm402 commentedThat is a good idea. I'll try to squeeze in some time and get at least a basic upgrade doc together.
On a side note, one thing we utilized in the older 6.x versions of the LDAP module is the ability to pull roles from Active Directory into Drupal and then map select roles. This was useful for giving the Webmaster and IT Department an admin role in our websites. We have upwards of 50 roles in our organization (we need each users' roles to be pulled from AD for access capabilities) and it was time consuming to make a key|value pair for each role to be assigned to itself because IT and Webmaster needed admin rights (without forcibly applying them in Drupal. I wanted every new IT user to be granted the admin rights automatically).
I went ahead and applied this change in the
ldap_authorization.inc, specifically the_ldap_authorizations_user_authorizations()function. I'd be more than happy to contribute the code to you, it is just a simple foreach loop. If you go forward with this, you may want to add a checkbox or, at minimum, a note of what would happen when the user adds role filters without checking the 'Use LDAP group to drupal roles filtering'.Comment #5
johnbarclay commentedI don't understand your comment #4. Maybe the code would illustrate it better. I'm changing this to a feature request also.
Comment #6
jrm402 commentedI'll post the code and explain a little better what I did.
At line 189 in the
ldap_authorization.incfile:I changed the
elsestatement to:As an example, with the original module, my roles pulled by ldap after logging into our support website are:
Instead of giving the webmaster role admin capabilities, I had created an admin role. After I made the change to the module, the roles I receive are:
I still receive the roles provided by LDAP and additionally, certain roles were mapped to the admin role. Kind of a best of both world situation.
I have the following in my mapping textarea:
Let me also state, in this example I used LDAP 7.x-1.0-beta5. I'm sure the code will migrate easily to the latest dev release if you choose to implement.
Comment #7
johnbarclay commentedI get it. Very handy. I'll commit this when I get a chance.
Comment #8
johnbarclay commentedI committed this. The only change I made was. Since its the way its supposed to behave there was no need to change the user interface.
to
Comment #9
jrm402 commentedHello,
I've tested the current 7.x-1.x-dev with the modification you committed and it worked great with one small modification. In the foreach loop, line 224 of 7.x-1.0-beta9+35-dev:
foreach ($consumer->consumerConf->mappings as $mapping_filter) { }We need to apply drupal_strtolower() to the $mapping_filter array too. If I typed the mapped keys with uppercase characters, they do not relate properly.
I added the array_walk() call inside the foreach. Here's what I have:
Thanks for the hard work. This module is great.
Comment #10
johnbarclay commentedThanks. The $map_to is case sensitive as far as I can see, but the map_from isn't; depends on the consumer type. This will always be a problem and I think we need to do as you suggest and just make it case insensitive; even in the user interface. This will avoid future pain. Thus, I think $consumer->consumerConf->mappings should just flat out be lowercase.
Attached is a patch. Its against the 2.0 branch but should be easy to apply against 1.0. It basically does the same thing as yours, but at a higher level. Can you give it a try? I'll move it into the 1.0 dev branch and make sure the simpletests work.
the gist of the patch is a few cases like:
and an optional parameter to the pipe list function.
Comment #11
johnbarclay commentedLooks like both are needed since you are dealing with the "unfiltered" case.
I committed your patch in #9 with slight change (below), but will keep this thread open for my change in comment 10.
Comment #12
jrm402 commentedYes that sounds good. I think case-insensitive would be the better approach here. You'll see a lot less support tickets I presume.
The fix that will be applied by the patch in comment 10 will solve the need for the strtolower call later, correct?
Comment #13
johnbarclay commentedThis issue is a good one, but before the next release candidate, case sensitivity and character escaping need to be looked at across all the ldap modules and documented. The esaping of \ and other characters should be fixed in the same pass. The testing of this needs to be outside of the simpletests as they use a fake ldap server.
Comment #14
johnbarclay commentedI changed the storage of ldap authorizations in the ldap authorization model to store both the lowercase and mixed case versions of authorization ids. This should deal with case sensitivity in ldap authorization.
Comment #15
johnbarclay commentedadditional case sensitivity issues should be treated as bugs.
Comment #15.0
johnbarclay commentedsummarized as general case sensitivity thread
Comment #16
selva8187 commentedHI
Comment #17
selva8187 commentedHI johnbarclay,
We are using latest LDAP 7.x-2.5 version for PHP 7.2 compatibility, But we are facing user login issue(This page isn’t working - redirected you too many times).
Issue we found username case different from Active Directory and Drupal DB. Like in Active Directory username in Uppercase and Drupal DB same username in Lowercase and vice versa.
We want to remove case sensitive validation like case insensitive.
Kindly help us to correct this changes in Latest version
Thank you
Comment #18
selva8187 commentedComment #19
grahl@selva8187 Please do not reopen closed issues. Create a new one and mentions his if you feel it’s related.
Please also read the submission guidelines first.