collective / pas.plugins.ldap

Zope (and Plone) PAS Plugin providing users and groups from LDAP directory
http://pypi.python.org/pypi/pas.plugins.ldap
Other
13 stars 20 forks source link

Error when using groups #1

Closed ju55i closed 12 years ago

ju55i commented 13 years ago

Got this error on Plone 4.1 and the tip of pas.plugins.ldap. Error is shown when accessing @@usergroup-groupprefs and there are LDAP groups available. Groups are groupOfNames objectClass. I'm not sure if this is a pasldap error or plone.app.controlpanel one.

Traceback (innermost last): Module ZPublisher.Publish, line 126, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 46, in call_object Module plone.app.controlpanel.usergroups, line 470, in call Module plone.app.controlpanel.usergroups, line 491, in doSearch AttributeError: 'NoneType' object has no attribute 'getProperty'

jensens commented 13 years ago

Thanks a lot for reporting. I'll look at it soon and come back to you!

jensens commented 12 years ago

it took me a while to go on with this. The LDAPPropertySheet worked only for users, so this was really broken. I also added IGroupIntrospection support to make Plone happy. Its all in testing-mode at the moment, so I keep this one open.

jensens commented 12 years ago

works now

ju55i commented 12 years ago

I'm still getting the same error even after the latest changes. Users work correctly but groups fail.

rnixx commented 12 years ago

Are you sure your group configuration is sane?

The error appears because...

acl.getGroupById(groupId)

...returns None.

Can you provide more information about used plugin configuration and LDAP schema please?

ju55i commented 12 years ago

I have only two groups in my test directory. The one with two members looks like this:

dn:: Y249VG9pbmVuIHJ5aG3DpCxvdT1ncm91cHMsZGM9dGFsYXNraXZpLGRjPW5ldA== cn:: VG9pbmVuIHJ5aG3DpA== member: cn=jptalask,ou=people,dc=talaskivi,dc=net member: cn=teppo,ou=people,dc=talaskivi,dc=net objectClass: groupOfNames objectClass: top

I can modify groups with JXplorer without any problems. And here is one of the users (which works correctly):

dn: cn=teppo,ou=people,dc=talaskivi,dc=net cn: teppo displayName: Teppo Testaaja givenName: Teppo mail: teppo.testaaja@example.org objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top sn: Testaaja l: Jossain

rnixx commented 12 years ago

and how does your plugin configuration for groups look like?

ju55i commented 12 years ago

Settings look like this: https://skitch.com/ju55i/f98f4/site

I also added o-attribute to groups but it didn't help.

rnixx commented 12 years ago

Try to leave groups serach query filter empty, it's already created by via object classes setting

On 08.10.2011 10:12, Jussi Talaskivi wrote:

Settings look like this: https://skitch.com/ju55i/f98f4/site

Robert Niederreiter

Squarewave Computing Aflingerstraße 19 A-6176 Völs Tel: +43 699 160 20 192 Web: http://www.squarewave.at

ju55i commented 12 years ago

It didn't work. Still the same error. I have logged the LDAP operations from the page request here: https://gist.github.com/80d748eca760bf1c261a

rnixx commented 12 years ago

hi, sorry my late response. i'm currently very busy, but will get back to you in touch asap.

rnixx commented 12 years ago

hi, you might should reduce and or correct the User PropertySheet Attributes and Group PropertySheet Attributes and then try again.

in addition it would be great, if error still occurs, if you step into plone.app.controlpanel.usergroups, line 491, in doSearch with pdb and take a look where and why None is returned.

Please make an update of pas.plugins.ldap, it contains now a very simple node inspector which can be used to look at all available attributes of a child node of users and groups containers.

If all this not helps at all, may you provide a LDIF export please?

-r

ju55i commented 12 years ago

The error is gone now. I consider this fixed.

alexsani commented 12 years ago

With Plone 4.2rc1 i have the same issue. In ZMI - acl_users -> ldap_autentication i enabled group_introspector functionality and the error is fixed. Thanks