When more than one consumer type is defined, such as drupal roles and organic groups, the load fails. In LdapAuthorizationConsumerConf.class.php, the following should be changed. This is in head now for 7.x-1.x
function __construct(&$consumer, $_new = FALSE, $_sid = NULL) {
$this->consumer = $consumer;
if ($_new) {
$this->inDatabase = FALSE;
$this->consumerType = $consumer->consumerType; //FALSE;
}
else {
+ $this->consumerType = $consumer->consumerType;
$this->inDatabase = TRUE;
$this->loadFromDb();
}
}
Comments
Comment #1
johnbarclay commentedComment #2
dayer4b commentedAwesome! Thanks, I'll try this out ASAP.
Comment #3
johnbarclay commentedpart of the same issue in ldap_authorization.admin.test.inc is that the tests were showing authorization results from all consumer types at the same time, but labelling them all with a single consumer type. This is in head also.
Comment #4
dayer4b commentedThat last update really helped. I had noticed the authorization tests problem earlier, but I didn't have time to post about it. Thanks for taking care of it. It's starting to look like my LDAP OG consumer is working properly! I just need to test it more and add a configuration parameter or two.
thanks!
Comment #5
johnbarclay commentedGreat!
Do you have any feedback on the structure of the ldap_authorization module and the consumer class? Are there additional properties/methods that you added that might be useful in the abstract class?
If you are going through the module application process, let me know and I can help speed things along by reviewing it. If you want to stick it in this project and have git access that would be fine too.
Comment #6
dayer4b commentedI think sticking it into this project might be the way to go. I'm sorry I've been incommunicado again, I was pretty sick for the last few days, and I'm also getting married this weekend. I realized that it's still not quite working properly. I'll update you when I can get it.
thanks
Comment #7
johnbarclay commentedcongrats on the marriage.