Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-c https://dist.plone.org/release/6.0.14/constraints.txt
-c https://dist.plone.org/release/6.1-dev/constraints.txt
1 change: 1 addition & 0 deletions news/2.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- False positives in local_groups check [mamico]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
9 changes: 3 additions & 6 deletions src/redturtle/pasldap/resilient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=(<LDAPPlugin at /.../acl_users/pasldap>,) kwargs={'id': None, 'login': None, 'exact_match': False, 'sort_by': None, 'max_results': None, 'fullname': 'mario'} elapsed=32ms threshold=-1ms 🤔
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading