Running latest dev of og-7.x-2.x, ldap-7.x-1.x etc. ldap_authorization_og is not enabled, only ldap_authorization_drupal_role. I have a ldap_authorization_drupal_role configuration that grants the user a couple of drupal roles.

I add a user to a couple of groups. I then login as that user and the group memberships disappear. It seems to happen during the call to user_save() in the function grantSingleAuthorization() in LdapauthorizationConsumerRole.class.php.

if I disable my ldap_authorization_drupal_role config or disable the ldap_authorization_drupal_role module the memberships are not affected.

it does not appear to be related to the ldap_authorization_og submodule, I even removed that submodule from the filesystem and the behaviour persists.

CommentFileSizeAuthor
#3 ldap-1588068.patch1.34 KBjzornig
#2 ldap-1588068.patch2.18 KBjzornig

Comments

johnbarclay’s picture

Title: group memberships removed on login » LDAP Authorization: group memberships removed on login
Status: Active » Postponed (maintainer needs more info)

I ran across this issue myself. It may be fixed in beta10. Please give this a try.

Why say removed from groups, do you mean drupal roles or og groups?

jzornig’s picture

StatusFileSize
new2.18 KB

Yes they are og groups. The ldap_authorization_drupal_roles is adding drupal roles to the user as expected but a side effect is that og groups get removed from the user.
I've tracked the problem to the calls to user_save() in the revokeSingleAuthorization() and grantSingleAuthorization() functions. A patch is included.

jzornig’s picture

StatusFileSize
new1.34 KB

previous patch included one change for a different issue. Here is the patch with just the changes for this issue.

johnbarclay’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs review

Thanks. I committed #3 to 7.x-1.x-dev. Leaving as needs review until this round of ldap authorization fixes is done and tested.

johnbarclay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.