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

support for memberOfExternalDNs #101

Closed jensens closed 4 years ago

jensens commented 4 years ago

see also https://github.com/bluedynamics/node.ext.ldap/pull/53

pbauer commented 4 years ago

Installation in a clean site still fails:

2020-04-17 10:25:09,503 ERROR   [Zope.SiteErrorLog:17][waitress] 1587111909.4970670.2567850304581484 http://localhost:8080/Plone2/acl_users/pasldap/manage_ldapplugin
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 248, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module Products.PDBDebugMode.wsgi_runcall, line 60, in pdb_runcall
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 58, in __call__
  Module zope.pagetemplate.pagetemplate, line 133, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module ff21fd9ba7eee634f480c7d8e27f3ba2.py, line 417, in render
  Module pas.plugins.ldap.properties, line 87, in form
  Module yafowil.controller, line 18, in __init__
  Module yafowil.base, line 468, in extract
    yafowil widget processing info:
    - path      : ldapsettings
    - blueprints: ['form']
    - task      : extract
    - descr     : failed at 'form'
  Module yafowil.compound, line 24, in compound_extractor
  Module yafowil.base, line 468, in extract
    yafowil widget processing info:
    - path      : ldapsettings.users
    - blueprints: ['fieldset']
    - task      : extract
    - descr     : failed at 'fieldset'
  Module yafowil.compound, line 24, in compound_extractor
  Module yafowil.base, line 431, in extract
  Module yafowil.base, line 501, in _runpreprocessors
    yafowil widget processing info:
    - path      : ldapsettings.users.memberOfExternalDNs
    - blueprints: ['field', 'plonelabel', 'error', 'checkbox']
    - task      : run preprocessors
    - descr     : execute
  Module yafowil.yaml.parser, line 156, in fetch_value
<pre>expr:context.users.memberOfExternalDNs</pre>
  Module <string>, line 1, in <module>
AttributeError: 'UsersConfig' object has no attribute 'memberOfExternalDNs'
rnixx commented 4 years ago

The relevant bits for this PR are merged in node.ext.ldap. Someone should fix travis and finish the work on this PR

pbauer commented 4 years ago

@jensens flake8 correctly complains about your change in https://github.com/collective/pas.plugins.ldap/commit/a150932aebe4059b7913f466e8ecebb4ae64382c#diff-201d2566640975dc9eb68ceecea6eb0bR97 Not sure what you did there 🤷‍♂️

rnixx commented 4 years ago

Should be

logger.exception("Error in {0}".format(prefix))

then

rnixx commented 4 years ago

Thanks for the work, I just dropped a 1.8.0 release.