Closed (fixed)
Project:
Lightweight Directory Access Protocol
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
5 Mar 2012 at 17:23 UTC
Updated:
25 May 2012 at 18:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
johnbarclay commentedComment #2
geste commentedI can reproduce this problem on a fresh install of D7.12 running MySQL 5.1.61 on Redhat 6.
I added LDAP 7.x-1.0-beta9 immediately after Drupal setup and enabled authentication and SSO without problems. SSO works great, even using NTLM auth type generically to get our Apache REMOTE_USER.
I then anabled LDAP Authorization and LDAP Authorization-Roles and created an authorization configuration but did not immediately enable it but saved it. Then once I fine-tuned some group|role filters I then checked "Enable this configuration" but the "Enabled" value was not saved. After multiple attempts I noticed 8-9 rows in ldap_authorization table which indeed had all of the changes I had attempted to save, but the "edit" operation would always retrieve the values from the first row and I concluded that the additional rows might be abnormal
So, I disabled the ldap_authorization/-roles modules and emptied the drupal_authorization table and re-enabled the ldap_auth/-roles modules. I then created a new ldap_authorization configuration and selected "Enable this configuration" immediately before save. The configuration was saved and works but subsequent changes to things like group|role filters were saved as new rows in the ldap_authorization table and were not being reference.
Hope this makes sense. Config file attached.
Jim
Comment #3
johnbarclay commentedthanks. appreciate the details. I will get this right after I return from drupalcon. Patch would be appreciated, but I think its an easy fix since it can be replicated on mysq and postgres.
Comment #4
johnbarclay commenteddo you have ctools module enabled? (It shouldn't need to be enabled)
Comment #5
johnbarclay commentedAnd does the field "numeric_consumer_conf_id" exist in the ldap_authorization table? I suspect this has something to do with the code in the save method of LdapAuthorizationConsumerConfAdmin.class.php, but can't replicate it. If you disable ctools do you still have the same behavior?
I'll take another look at this after I get all the code I'm working on checked in; my install isn't close enough to a clean install to be useful here.
Comment #6
johnbarclay commentedThanks for your patience on this one. I replicated the error and committed a fix for it in 7.x-1.0-dev. All this pain was from changing the "edit" button to say "save". The only change is below in case you want to avoid the latest dev version.
In LdapAuthorizationConsumerConfAdmin.class.php in the function populateFromDrupalForm
Comment #7
johnbarclay commented