diff --git a/constraints.txt b/constraints.txt index 83330c8..00e902a 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1 +1 @@ --c https://dist.plone.org/release/6.0.14/constraints.txt +-c https://dist.plone.org/release/6.1-dev/constraints.txt diff --git a/news/2.bugfix b/news/2.bugfix new file mode 100644 index 0000000..4cee7d4 --- /dev/null +++ b/news/2.bugfix @@ -0,0 +1 @@ +- False positives in local_groups check [mamico] diff --git a/pyproject.toml b/pyproject.toml index e582e95..e8af3b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # https://github.com/plone/meta/tree/main/config/default # See the inline comments on how to expand/tweak this configuration file [build-system] -requires = ["setuptools>=68.2"] +requires = ["setuptools>=75.1"] [tool.towncrier] directory = "news/" diff --git a/src/redturtle/pasldap/resilient.py b/src/redturtle/pasldap/resilient.py index dfb61a0..49a6410 100644 --- a/src/redturtle/pasldap/resilient.py +++ b/src/redturtle/pasldap/resilient.py @@ -21,6 +21,7 @@ ] RESERVED_LOGINS = RESERVED_IDS + # [node.ext.ldap:511][MainThread] LDAP search with filter: (&(objectClass=person)(sAMAccountName=root)) # [redturtle.pasldap:58][MainThread] func=pas.plugins.ldap.plugin.enumerateUsers info=None args=(,) kwargs={'id': None, 'login': None, 'exact_match': False, 'sort_by': None, 'max_results': None, 'fullname': 'mario'} elapsed=32ms threshold=-1ms 🤔 @@ -87,12 +88,8 @@ def _wrapper( logger.info("MISS: enumerateUsers %s", cache_key) if not users: local_users = api.portal.get_tool("acl_users").source_users - local_groups = api.portal.get_tool("acl_users").source_groups - if not local_users.enumerateUsers( - id=id, login=login, exact_match=True - ) and not local_groups.enumerateGroups( - id=id, login=login, exact_match=True - ): + # local_groups = api.portal.get_tool("acl_users").source_groups + if not local_users.enumerateUsers(id=id, login=login, exact_match=True): # TODO: verificare se il risultato vuoto è un errore (da non mettere in cache) o veramente # un risultato vuoto (da mettere in cache? solo temporaneamente?) logger.warning( diff --git a/tox.ini b/tox.ini index cfe0e6c..05f8004 100644 --- a/tox.ini +++ b/tox.ini @@ -105,7 +105,7 @@ set_env = deps = pytest-plone pytest - -c https://dist.plone.org/release/6.0-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt ## # Specify additional deps in .meta.toml: @@ -147,7 +147,7 @@ deps = pytest-plone pytest coverage - -c https://dist.plone.org/release/6.0.14/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = coverage run --source redturtle.pasldap -m pytest {posargs} --disable-warnings {toxinidir}/tests @@ -164,7 +164,7 @@ deps = twine build towncrier - -c https://dist.plone.org/release/6.0.14/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = # fake version to not have to install the package @@ -192,7 +192,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.0.14/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = # Generate the full dependency tree